diff --git a/tftp.c b/tftp.c index c30042d..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 = MIN(args->rx_timeout / (args->blind ? 50 : 5), 2000); + 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;