romange / helio

A modern framework for backend development based on io_uring Linux interface
Apache License 2.0
447 stars 50 forks source link

fix: fix non-linux set nonblocking #110

Closed andydunstall closed 1 year ago

andydunstall commented 1 year ago

Running locally found EpollSocket::Accept was just blocking forever and never suspending the fiber - looks like FD_CLOEXEC is being set with F_SETFL instead of F_SETFD which is then breaking O_NONBLOCK

@romange this is part of the cause of the deadlock you mentioned (if Accept never releases the fiber the accept loop never finishes so AcceptServer::Stop blocks in the test tear down) - though theres then another issue where shutdown isn't waking up the accept fiber so it still blocks Stop (will look at that separately)