mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 19:07:57 +00:00
Forgot to handle Banned in inject_connected (#2107)
* Forgot to handle Banned in inject_connected * Also add debug for the state
This commit is contained in:
@@ -571,7 +571,8 @@ where
|
||||
match (self.peers.entry(peer_id), connected_point) {
|
||||
(Entry::Occupied(mut entry), connected_point) => {
|
||||
match mem::replace(entry.get_mut(), PeerState::Poisoned) {
|
||||
PeerState::Requested | PeerState::PendingRequest { .. } => {
|
||||
PeerState::Requested | PeerState::PendingRequest { .. } |
|
||||
PeerState::Banned { .. } => {
|
||||
debug!(target: "sub-libp2p", "Libp2p => Connected({:?}): Connection \
|
||||
requested by PSM (through {:?})", entry.key(), connected_point);
|
||||
debug!(target: "sub-libp2p", "Handler({:?}) <= Enable", entry.key());
|
||||
@@ -584,7 +585,7 @@ where
|
||||
st @ _ => {
|
||||
// This is a serious bug either in this state machine or in libp2p.
|
||||
error!(target: "sub-libp2p", "Received inject_connected for \
|
||||
already-connected node");
|
||||
already-connected node; state is {:?}", st);
|
||||
*entry.into_mut() = st;
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user