diff --git a/source/vibe/core/net.d b/source/vibe/core/net.d index 1bef7d7..7c5c56e 100644 --- a/source/vibe/core/net.d +++ b/source/vibe/core/net.d @@ -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()