mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +00:00
Do not prematurely emit CustomProtocolClosed on connection close. (#5595)
This commit is contained in:
@@ -914,7 +914,7 @@ impl NetworkBehaviour for GenericProto {
|
||||
// in which case `CustomProtocolClosed` was already emitted.
|
||||
let closed = open.is_empty();
|
||||
open.retain(|c| c != conn);
|
||||
if !closed {
|
||||
if open.is_empty() && !closed {
|
||||
debug!(target: "sub-libp2p", "External API <= Closed({})", peer_id);
|
||||
let event = GenericProtoOut::CustomProtocolClosed {
|
||||
peer_id: peer_id.clone(),
|
||||
|
||||
Reference in New Issue
Block a user