diff options
-rw-r--r-- | tqftpserv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tqftpserv.c b/tqftpserv.c index 5c4cb47..dd9b270 100644 --- a/tqftpserv.c +++ b/tqftpserv.c @@ -423,9 +423,11 @@ static int handle_reader(struct tftp_client *client) break; } printf("[TQFTP] Sent block %d of %zd\n", block + 1, n); + if (n == 0) + break; } - return n == 0 ? 0 : 1; + return 1; } static int handle_writer(struct tftp_client *client) |