mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-31 03:05:40 +00:00
Don't close inbound notifications substreams immediately (#6781)
* Don't close inbound notifications substreams immediately * Fix not closing in return to node A closing
This commit is contained in:
@@ -163,11 +163,9 @@ impl ProtocolsHandler for NotifsInHandler {
|
||||
}
|
||||
|
||||
// Note that we drop the existing substream, which will send an equivalent to a TCP "RST"
|
||||
// to the remote and force-close the substream. It might seem like an unclean way to get
|
||||
// to the remote and force-close the substream. It might seem like an unclean way to get
|
||||
// rid of a substream. However, keep in mind that it is invalid for the remote to open
|
||||
// multiple such substreams, and therefore sending a "RST" is the correct thing to do.
|
||||
// Also note that we have already closed our writing side during the initial handshake,
|
||||
// and we can't close "more" than that anyway.
|
||||
// multiple such substreams, and therefore sending a "RST" is not an incorrect thing to do.
|
||||
self.substream = Some(proto);
|
||||
|
||||
self.events_queue.push_back(ProtocolsHandlerEvent::Custom(NotifsInHandlerOut::OpenRequest(msg)));
|
||||
|
||||
Reference in New Issue
Block a user