Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix wrong value put for pending_opening (#7633)
Browse files Browse the repository at this point in the history
* Fix wrong value put for pending_opening

* Oops, didn't even try compiling it
  • Loading branch information
tomaka authored Nov 30, 2020
1 parent 2fbab76 commit 779c801
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/network/src/protocol/generic_proto/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ impl ProtocolsHandler for NotifsHandler {
_ => unreachable!()
};

debug_assert_eq!(pending_opening.len(), self.out_protocols.len());
for (n, is_pending) in pending_opening.iter().enumerate() {
if *is_pending {
continue;
Expand Down Expand Up @@ -740,8 +741,9 @@ impl ProtocolsHandler for NotifsHandler {

match &mut self.state {
State::Open { .. } => {
let pending_opening = self.out_protocols.iter().map(|_| false).collect();
self.state = State::Closed {
pending_opening: Vec::new(),
pending_opening,
};
},
State::Opening { out_substreams, .. } => {
Expand Down

0 comments on commit 779c801

Please sign in to comment.