-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ConnectablePayloadWriter
: avoid static exception that may leak memo…
…ry (#3047) Motivation: `ConnectablePayloadWriter` uses a static `IOException` instance as a state and can propagate it to `Subscriber`. This opens a possibility for a memory leak if `Subscriber` or intermediate operators attach a suppressed exception to this static instance. Modifications: - Create `StacklessCancelledIOException` and always use a new instance in case of cancellation; - Keep `cancel()` noop if `outer.closed != null`; Result: `ConnectablePayloadWriter` can not leak memory via static exception instance.
- Loading branch information
1 parent
8074930
commit ed0265c
Showing
2 changed files
with
27 additions
and
5 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