Skip to content

Commit

Permalink
Format comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatson committed Dec 4, 2024
1 parent 90a823b commit c8cd17c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/librqbit/src/torrent_state/live/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,9 +845,13 @@ impl TorrentStateLive {
tx: PeerTx,
) -> anyhow::Result<()> {
let mut sent_peers_live: HashSet<SocketAddr> = HashSet::new();
const MAX_SENT_PEERS: usize = 50; // As per BEP 11 we should not send more than 50 peers at once (here it also applies to fist message, should be OK as we anyhow really have more)
const PEX_MESSAGE_INTERVAL: Duration = Duration::from_secs(60); // As per BEP 11 recommended interval is min 60 seconds
let mut delay = Duration::from_secs(10); // Wait 10 seconds before sending the first message to assure that peer will stay with us
// As per BEP 11 we should not send more than 50 peers at once
// (here it also applies to fist message, should be OK as we anyhow really have more)
const MAX_SENT_PEERS: usize = 50;
// As per BEP 11 recommended interval is min 60 seconds
const PEX_MESSAGE_INTERVAL: Duration = Duration::from_secs(60);
// Wait 10 seconds before sending the first message to assure that peer will stay with us
let mut delay = Duration::from_secs(10);

loop {
tokio::select! {
Expand Down

0 comments on commit c8cd17c

Please sign in to comment.