Merge pull request #52 from nexor/tcpconnection_leastsize
Fix incorrect return value in TCPConnection.leastSize()
This commit is contained in:
commit
34cd10b57d
|
@ -535,7 +535,7 @@ struct TCPConnection {
|
|||
return s >= ConnectionState.connected && s < ConnectionState.activeClose;
|
||||
}
|
||||
@property bool empty() { return leastSize == 0; }
|
||||
@property ulong leastSize() { waitForData(); return m_context && m_context.readBuffer.length; }
|
||||
@property ulong leastSize() { waitForData(); return m_context ? m_context.readBuffer.length : 0; }
|
||||
@property bool dataAvailableForRead() { return waitForData(0.seconds); }
|
||||
|
||||
void close()
|
||||
|
|
Loading…
Reference in a new issue