Fix not restoring non-poisoned state (#7906)

This commit is contained in:
Pierre Krieger authored and GitHub committed 2021-01-15 12:47:32 +00:00
1 parent 81efcc4e52
commit 7db15cfb75
1 file changed
+2 -1
@@ -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)) {