mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 04:37:57 +00:00
Report when peer is clogged (#1528)
This commit is contained in:
@@ -160,6 +160,14 @@ pub enum BehaviourOut {
|
||||
data: Bytes,
|
||||
},
|
||||
|
||||
/// A substream with a remote is clogged. We should avoid sending more data to it if possible.
|
||||
Clogged {
|
||||
/// Id of the peer the message came from.
|
||||
peer_id: PeerId,
|
||||
/// Protocol which generated the message.
|
||||
protocol_id: ProtocolId,
|
||||
},
|
||||
|
||||
/// We have obtained debug information from a peer.
|
||||
Identified {
|
||||
/// Id of the peer that has been identified.
|
||||
@@ -174,13 +182,16 @@ impl From<CustomProtosOut> for BehaviourOut {
|
||||
match other {
|
||||
CustomProtosOut::CustomProtocolOpen { protocol_id, version, peer_id, endpoint } => {
|
||||
BehaviourOut::CustomProtocolOpen { protocol_id, version, peer_id, endpoint }
|
||||
},
|
||||
}
|
||||
CustomProtosOut::CustomProtocolClosed { protocol_id, peer_id, result } => {
|
||||
BehaviourOut::CustomProtocolClosed { protocol_id, peer_id, result }
|
||||
},
|
||||
}
|
||||
CustomProtosOut::CustomMessage { protocol_id, peer_id, data } => {
|
||||
BehaviourOut::CustomMessage { protocol_id, peer_id, data }
|
||||
},
|
||||
}
|
||||
CustomProtosOut::Clogged { protocol_id, peer_id } => {
|
||||
BehaviourOut::Clogged { protocol_id, peer_id }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user