Fix not restoring non-poisoned state (#7906)

This commit is contained in:
Pierre Krieger
2021-01-15 13:47:32 +01:00
committed by GitHub
parent 81efcc4e52
commit 7db15cfb75
@@ -1674,9 +1674,10 @@ impl NetworkBehaviour for GenericProto {
notifications_sink: replacement_sink,
};
self.events.push_back(NetworkBehaviourAction::GenerateEvent(event));
*entry.into_mut() = PeerState::Enabled { connections };
}
*entry.into_mut() = PeerState::Enabled { connections };
} else {
// List of open connections wasn't empty before but now it is.
if !connections.iter().any(|(_, s)| matches!(s, ConnectionState::Opening)) {