-
Notifications
You must be signed in to change notification settings - Fork 856
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
notifications/libp2p: Terminate the outbound notification substream o…
…n `std::io::Errors` (#7724) This PR handles a case where we called the `poll_next` on an outbound substream notification to check if the stream is closed. It is entirely possible that the `poll_next` would return an `io::error`, for example end of file. This PR ensures that we make the distinction between unexpected incoming data, and error originated from `poll_next`. While at it, the bulk of the PR change propagates the PeerID from the network behavior, through the notification handler, to the notification outbound stream for logging purposes. cc @paritytech/networking Part of: #7722 --------- Signed-off-by: Alexandru Vasile <[email protected]>
- Loading branch information
Showing
4 changed files
with
116 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
title: Terminate libp2p the outbound notification substream on io errors | ||
|
||
doc: | ||
- audience: [Node Dev, Node Operator] | ||
description: | | ||
This PR handles a case where we called the poll_next on an outbound substream notification to check if the stream is closed. | ||
It is entirely possible that the poll_next would return an io::error, for example end of file. | ||
This PR ensures that we make the distinction between unexpected incoming data, and error originated from poll_next. | ||
While at it, the bulk of the PR change propagates the PeerID from the network behavior, through the notification handler, to the notification outbound stream for logging purposes. | ||
|
||
crates: | ||
- name: sc-network | ||
bump: patch |
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
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