Fix pipe writing

This commit is contained in:
Benjamin Schaaf 2019-05-05 14:31:12 +10:00
parent 83310fda70
commit 9a09e42802

View file

@ -195,7 +195,7 @@ final class PosixEventDriverPipes(Loop : PosixEventLoop) : EventDriverPipes {
auto cb = slot.writeCallback;
slot.writeCallback = null;
slot.writeBuffer = null;
cb(pipe, IOStatus.error, slot.bytesRead);
cb(pipe, status, slot.bytesWritten);
}
ssize_t ret = () @trusted { return write(cast(int)pipe, slot.writeBuffer.ptr, min(slot.writeBuffer.length, int.max)); } ();