Skip to content

Commit

Permalink
fix: Condition disconnect on CLI flag
Browse files Browse the repository at this point in the history
  • Loading branch information
aszepieniec committed Nov 27, 2024
1 parent 71728a0 commit c2d556a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/connect_to_peers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ where
info!("Connection accepted from {}", peer_address);

// If necessary, disconnect from another, existing peer.
if acceptance_code == ConnectionStatus::AcceptedMaxReached {
if acceptance_code == ConnectionStatus::AcceptedMaxReached && state.cli().bootstrap {
info!("Maximum # peers reached, so disconnecting from an existing peer.");
peer_task_to_main_tx
.send(PeerTaskToMain::DisconnectFromLongestLivedPeer)
Expand Down

0 comments on commit c2d556a

Please sign in to comment.