-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> (cherry picked from commit fdc3a31) Co-authored-by: Rick Newton-Rogers <[email protected]>
- Loading branch information
Showing
2 changed files
with
148 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters