1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2026-10-23 11:59:56 +00:00

give capnp ownership of process output fd

this fixes an intermittent issue (race condition?) where
the IoContext attempts to poll an already-closed fd
This commit is contained in:
Oliver Giles
2017-07-31 08:53:50 +03:00
parent 668ada74d1
commit 3068180f8e
2 changed files with 1 additions and 2 deletions

View File

@@ -389,7 +389,7 @@ void Server::stop() {
}
void Server::addDescriptor(int fd, std::function<void(char*,size_t)> cb) {
auto event = this->ioContext.lowLevelProvider->wrapInputFd(fd);
auto event = this->ioContext.lowLevelProvider->wrapInputFd(fd, kj::LowLevelAsyncIoProvider::TAKE_OWNERSHIP);
tasks.add(handleFdRead(event, cb).attach(std::move(event)));
}