Skip to content

Commit

Permalink
peer_loop: use const booleans to indicate if connection should be closed
Browse files Browse the repository at this point in the history
Avoids using booleans directly. A more elegant solution would probably
be to invent an enum for this purpose. But this is fine too, I think.
  • Loading branch information
Sword-Smith committed Oct 16, 2024
1 parent e7fd919 commit 3c413d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/peer_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ impl PeerLoopHandler {
}
MainToPeerTask::PeerSynchronizationTimeout(socket_addr) => {
if self.peer_address != socket_addr {
return Ok(false);
return Ok(KEEP_CONNECTION_ALIVE);
}

self.punish(PeerSanctionReason::SynchronizationTimeout)
Expand Down

0 comments on commit 3c413d7

Please sign in to comment.