From 8943179867d1644372e3b11eae7582d080c5378c Mon Sep 17 00:00:00 2001 From: Ville Heikkinen Date: Thu, 26 Oct 2023 16:21:42 +0300 Subject: [PATCH 1/2] Fix receiving files when duplicate packets == 0 Acks weren't sent at all in case duplicate packets were configured to be zero. --- src/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.rs b/src/server.rs index 49eb300..b607fe3 100644 --- a/src/server.rs +++ b/src/server.rs @@ -221,7 +221,7 @@ impl Server { worker_options.block_size, worker_options.timeout, worker_options.window_size, - self.duplicate_packets, + self.duplicate_packets + 1, ); worker.receive() }; From 4f5f71bc76a98e230c7ab34e9956f935ef01e52e Mon Sep 17 00:00:00 2001 From: Ville Heikkinen Date: Thu, 26 Oct 2023 16:25:02 +0300 Subject: [PATCH 2/2] Set duplicate-packets default to match the help Help text says that the duplicate-packets default is 0, so set it also to be the default. --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index c870d71..ca1dfa6 100644 --- a/src/config.rs +++ b/src/config.rs @@ -45,7 +45,7 @@ impl Config { directory: env::current_dir().unwrap_or_else(|_| env::temp_dir()), single_port: false, read_only: false, - duplicate_packets: 1, + duplicate_packets: 0, overwrite: false, };