Files
swift-nio/Sources
Joakim Hassila 9a224ae35f Add custom cleanup hook to allow PipeChannel to properly deregister during halfclose (#1793)
Allow PipeChannel to perform custom cleanup to drop references to fds.

Motivation:

Currently PipeChannel doesn't properly deregister from the selector during half-closes.
This means that some backend implementations will keep a reference on the kernel side
which means that the POLLHUP will not be delivered for the read end of a pipe in
e.g. NIOTests.StreamChannelTest/testHalfCloseOwnOutput - this has the test failing
in #1761 / #1788.

Modification:

Add a generic cleanup hook to allow PipeChannel
to properly deregister.

Result:

The final reference to the fd is dropped resulting in a POLLHUP being delivered
as needed - making NIOTests.StreamChannelTest/testHalfCloseOwnOutput to pass
for io_uring.
2021-04-07 16:08:12 +01:00
..
2021-01-22 18:39:10 +00:00