util/PeakBuffer: use IsEmpty() instead of IsNull()
The DynamicFifoBuffer methods never return nullptr when the buffer is empty or full; instead, they return an empty buffer. This bug caused an endless loop.
This commit is contained in:
@@ -60,7 +60,7 @@ FullyBufferedSocket::Flush()
|
||||
assert(IsDefined());
|
||||
|
||||
const auto data = output.Read();
|
||||
if (data.IsNull()) {
|
||||
if (data.IsEmpty()) {
|
||||
IdleMonitor::Cancel();
|
||||
CancelWrite();
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user