Longer timeout for initial WRQ
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Wed, 17 Feb 2016 11:19:31 +0000 (12:19 +0100)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Wed, 17 Feb 2016 11:19:31 +0000 (12:19 +0100)
tftp.c

diff --git a/tftp.c b/tftp.c
index a15179259166dea89f218194ff2dff1d67b04ee6..19866b4afacb22386d5dad98e1d4751655c0c74d 100644 (file)
--- a/tftp.c
+++ b/tftp.c
@@ -322,7 +322,7 @@ int tftp_put(struct nmrpd_args *args)
                if (ret < 0) {
                        goto cleanup;
                } else if (!ret) {
-                       if (++timeout < 5) {
+                       if (++timeout < 5 || (!block && timeout < 10)) {
                                continue;
                        } else if (block) {
                                fprintf(stderr, "Timeout while waiting for ACK(%d).\n", block);