Another fix attempt for the special read 0 behavior.
This commit is contained in:
parent
bd860d71d7
commit
619948c4d5
|
@ -429,7 +429,7 @@ final class PosixEventDriverSockets(Loop : PosixEventLoop) : EventDriverSockets
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret > 0 || buffer.length == 0) {
|
if (ret >= 0) {
|
||||||
buffer = buffer[ret .. $];
|
buffer = buffer[ret .. $];
|
||||||
if (mode != IOMode.all || buffer.length == 0) {
|
if (mode != IOMode.all || buffer.length == 0) {
|
||||||
on_read_finish(socket, IOStatus.ok, ret);
|
on_read_finish(socket, IOStatus.ok, ret);
|
||||||
|
|
Loading…
Reference in a new issue