Fix incorrect return value in TCPConnection.leastSize()

This commit is contained in:
Pavel Chebotarev 2018-01-27 18:53:16 +03:00
parent eb82c2ad35
commit 13e6c2aa41

View file

@ -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()