mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 10:41:09 +00:00
Always accept incoming connections (#2101)
This commit is contained in:
committed by
Arkadiy Paronyan
parent
a1f3b0b529
commit
b6c54b5c40
@@ -563,7 +563,7 @@ 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::Requested | PeerState::PendingRequest { .. } => {
|
||||
debug!(target: "sub-libp2p", "Libp2p => Connected({:?}): Connection \
|
||||
requested by PSM (through {:?})", entry.key(), connected_point);
|
||||
debug!(target: "sub-libp2p", "Handler({:?}) <= Enable", entry.key());
|
||||
@@ -573,21 +573,6 @@ where
|
||||
});
|
||||
*entry.into_mut() = PeerState::Enabled { open: false, connected_point };
|
||||
}
|
||||
PeerState::PendingRequest { timer } => {
|
||||
debug!(target: "sub-libp2p", "Libp2p => Connected({:?}): Connection \
|
||||
requested by PSM (through {:?}) but node is banned", entry.key(),
|
||||
connected_point);
|
||||
debug!(target: "sub-libp2p", "Handler({:?}) <= Disable", entry.key());
|
||||
self.events.push(NetworkBehaviourAction::SendEvent {
|
||||
peer_id: entry.key().clone(),
|
||||
event: CustomProtoHandlerIn::Disable,
|
||||
});
|
||||
*entry.into_mut() = PeerState::DisabledPendingEnable {
|
||||
open: false,
|
||||
connected_point,
|
||||
timer,
|
||||
};
|
||||
}
|
||||
st @ _ => {
|
||||
// This is a serious bug either in this state machine or in libp2p.
|
||||
error!(target: "sub-libp2p", "Received inject_connected for \
|
||||
|
||||
Reference in New Issue
Block a user