Files
swift-nio/Sources
Cory BenfieldandRick Newton-Rogers 7bb2d554cc Backport: BaseSocketChannel flushNow IONotificationState changes (#2954) (#2981)
### Motivation:

We could previously hit an assert do to a re-entrancy issue where
channel and buffered write state could change during a call-out leading
to invalid state.

### Modifications:

The decision on whether or not we should be registered for future writes
is now taken after the call outs to `fireChannelWritabilityChanged` and
`fireChannelReadComplete`. The new registration state is set to
`.unregister` if the channel is not open or if there are now flushed
pending writes.

### Result:

Scope for re-entrancy crashes is reduced.

Co-authored-by: Cory Benfield <lukasa@apple.com>
(cherry picked from commit fdc3a31a55)

Co-authored-by: Rick Newton-Rogers <rnro@apple.com>
2024-11-21 10:55:14 +00:00
..
2024-01-16 03:30:26 -08:00
2024-09-12 13:18:25 +01:00
2024-09-12 13:18:25 +01:00
2024-07-19 11:48:17 +02:00
2024-07-19 11:48:17 +02:00