Another fix attempt for the special read 0 behavior.

This commit is contained in:
Sönke Ludwig 2017-01-22 21:29:12 +01:00
parent bd860d71d7
commit 619948c4d5

View file

@ -429,7 +429,7 @@ final class PosixEventDriverSockets(Loop : PosixEventLoop) : EventDriverSockets
return;
}
if (ret > 0 || buffer.length == 0) {
if (ret >= 0) {
buffer = buffer[ret .. $];
if (mode != IOMode.all || buffer.length == 0) {
on_read_finish(socket, IOStatus.ok, ret);