From d4c3fc51eee01d30308506631ba874944880c903 Mon Sep 17 00:00:00 2001 From: "Joseph C. Lehner" Date: Thu, 12 Oct 2023 16:26:21 +0200 Subject: [PATCH] Revert "Reduce TFTP packet timeout" This reverts commit 96d9f189e22686b9e0409740e462820e8c30bd20. This should address #137. --- tftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tftp.c b/tftp.c index c1e79f9..bf18f08 100644 --- a/tftp.c +++ b/tftp.c @@ -329,7 +329,7 @@ ssize_t tftp_put(struct nmrpd_args *args) const char *file_remote = args->file_remote; char *val, *end; bool rollover, tftp_ack0_callback_called; - const unsigned rx_timeout = args->blind ? 200 : 100; + const unsigned rx_timeout = MAX(args->rx_timeout / (args->blind ? 50 : 5), 2000); const unsigned max_timeouts = args->blind ? 3 : 5; #ifndef NMRPFLASH_WINDOWS int enabled = 1;