mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Motivation: In the grpc-swift test suite, we saw a case where the server would always immediately close the accepted socket. This lead NIO to misbehave badly because kqueue would send us the `readEOF` before the `writable` event that finishes an asynchronous `connect`. What happened is that we just dropped the `readEOF` on the floor so we would never actually tell the user if the channel ever went away. Modifications: Only register for `readEOF` after becoming active. Result: - we're happy with servers that immediately close the socket