Fix wrong value put for pending_opening (#7633)

* Fix wrong value put for pending_opening

* Oops, didn't even try compiling it
This commit is contained in:
Pierre Krieger
2020-11-30 15:05:01 +01:00
committed by GitHub
parent 7753a2250f
commit dd3c84c362
@@ -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;
@@ -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, .. } => {