Skip to content
Snippets Groups Projects
Unverified Commit 1bc6ca60 authored by Alexandru Vasile's avatar Alexandru Vasile Committed by GitHub
Browse files

notifications/libp2p: Terminate the outbound notification substream on `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: https://github.com/paritytech/polkadot-sdk/issues/7722

---------

Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
parent 9adb8d28
No related merge requests found
Pipeline #517421 waiting for manual action with stages
in 1 hour, 43 minutes, and 25 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment