From f1a20b0c8c6c693ad9edafe7bffaa2061222b6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 11 May 2020 16:22:30 +0200 Subject: [PATCH] aquatic_ws: add some fixme comments, update ValidUntil time --- aquatic_ws/src/lib/handler.rs | 6 +++--- aquatic_ws/src/lib/network.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aquatic_ws/src/lib/handler.rs b/aquatic_ws/src/lib/handler.rs index 02d271b..93d1929 100644 --- a/aquatic_ws/src/lib/handler.rs +++ b/aquatic_ws/src/lib/handler.rs @@ -23,12 +23,12 @@ pub fn run_request_worker( let mut rng = SmallRng::from_entropy(); - let timeout = Duration::from_micros(200); + let timeout = Duration::from_micros(200); // FIXME: config loop { let mut opt_torrent_map_guard: Option> = None; - for i in 0..1000 { + for i in 0..1000 { // FIXME config let opt_in_message = if i == 0 { in_message_receiver.recv().ok() } else { @@ -193,7 +193,7 @@ pub fn handle_announce_requests( } let response = OutMessage::AnnounceResponse(AnnounceResponse { - info_hash: info_hash, + info_hash, complete: torrent_data.num_seeders, incomplete: torrent_data.num_leechers, announce_interval: 120, // FIXME: config diff --git a/aquatic_ws/src/lib/network.rs b/aquatic_ws/src/lib/network.rs index f8a3d23..8eb4cca 100644 --- a/aquatic_ws/src/lib/network.rs +++ b/aquatic_ws/src/lib/network.rs @@ -124,7 +124,7 @@ pub fn run_socket_worker( poll.poll(&mut events, Some(poll_timeout)) .expect("failed polling"); - let valid_until = ValidUntil::new(600); // FIXME: config + let valid_until = ValidUntil::new(180); // FIXME: config for event in events.iter(){ let token = event.token();