瀏覽代碼

Decrease default TFTP timeout

Joseph C. Lehner 6 月之前
父節點
當前提交
c234a07d67
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tftp.c

+ 1 - 1
tftp.c

@@ -329,7 +329,7 @@ ssize_t tftp_put(struct nmrpd_args *args)
 	const char *file_remote = args->file_remote;
 	const char *file_remote = args->file_remote;
 	char *val, *end;
 	char *val, *end;
 	bool rollover;
 	bool rollover;
-	const unsigned rx_timeout = MAX(args->rx_timeout / (args->blind ? 50 : 5), 2000);
+	const unsigned rx_timeout = MAX(args->rx_timeout / 50, 200);
 	const unsigned max_timeouts = args->blind ? 3 : 5;
 	const unsigned max_timeouts = args->blind ? 3 : 5;
 #ifndef NMRPFLASH_WINDOWS
 #ifndef NMRPFLASH_WINDOWS
 	int enabled = 1;
 	int enabled = 1;