diff --git a/TODO.md b/TODO.md index cd97f11..442fc47 100644 --- a/TODO.md +++ b/TODO.md @@ -3,6 +3,7 @@ * Configuration, cli * Tests * Benchmarks (with criterion?) +* Clean connections: `state.connections.shrink_to_fit()`? ## Don't do diff --git a/aquatic/src/handler.rs b/aquatic/src/handler.rs index b9cc7d6..d9e0887 100644 --- a/aquatic/src/handler.rs +++ b/aquatic/src/handler.rs @@ -100,9 +100,7 @@ pub fn handle_announce_requests( let response = Response::Announce(AnnounceResponse { transaction_id: request.transaction_id, - announce_interval: AnnounceInterval( - 600 // config.announce_interval as i32 - ), + announce_interval: AnnounceInterval(600), // FIXME leechers: NumberOfPeers(torrent_data.num_leechers.load(Ordering::SeqCst) as i32), seeders: NumberOfPeers(torrent_data.num_seeders.load(Ordering::SeqCst) as i32), peers: response_peers diff --git a/aquatic/src/network.rs b/aquatic/src/network.rs index 2f1405c..cf4841a 100644 --- a/aquatic/src/network.rs +++ b/aquatic/src/network.rs @@ -86,7 +86,7 @@ pub fn run_event_loop( Ok((amt, src)) => { let request = request_from_bytes( &buffer[..amt], - 255u8 + 255u8 // FIXME ); match request { @@ -111,8 +111,6 @@ pub fn run_event_loop( }, err => { eprintln!("recv_from error: {:?}", err); - - break; } } } @@ -148,8 +146,6 @@ pub fn run_event_loop( }, err => { eprintln!("send_to error: {:?}", err); - - break; } } }