mirror of
https://github.com/ohwgiles/laminar.git
synced 2026-10-23 03:49:55 +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:
@@ -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)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user