Opened 4 years ago
#4886 defect new
PCP dies if self._writeSomeData returns 0
|Reported by:||jknight||Owned by:|
It ends up failing this assert.
assert not self._buffer, (
"Writing fresh data to consumer before my buffer is empty!")
That happens because it sets self.outstandingPull to true by mistake in resumeProducing, not realizing that the reason it didn't send data was *not* that buffer was empty.
Normally, outstandingPull should never be true if there is still data left in _buffer.
This (_writeSomeData returning 0) can actually happen when using htb.py and time.time goes backwards.