Skip to content

Commit

Permalink
Merge pull request #72 from AIBlockOfficial/bugfix_peer_limit_handshake
Browse files Browse the repository at this point in the history
Bugfix peer limit handshake
  • Loading branch information
BHouwens authored May 21, 2024
2 parents 2c99a97 + 14145f3 commit 46ec8e4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/comms_handler/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,15 @@ impl Node {
peer.peer_type = Some(peer_type);

if let Some(notify) = peer.notify_handshake_response.0.take() {
notify.send(()).unwrap();
match notify.send(()) {
Ok(()) => {}
Err(_) => {
return Err(CommsError::PeerInvalidState(PeerInfo {
node_type: Some(peer_type),
address: Some(peer_addr),
}));
}
}
}
}

Expand Down

0 comments on commit 46ec8e4

Please sign in to comment.