diff --git a/nmrpflash.cbp b/nmrpflash.cbp index b2fde97..bf9b66d 100644 --- a/nmrpflash.cbp +++ b/nmrpflash.cbp @@ -18,7 +18,7 @@ - + diff --git a/tftp.c b/tftp.c index ab6eb3e..04509aa 100644 --- a/tftp.c +++ b/tftp.c @@ -491,6 +491,9 @@ ssize_t tftp_put(struct nmrpd_args *args) } ret = tftp_recvfrom(sock, rx, &port, rx_timeout, blksize + 4); + + // stop calling nmrp_discard() if the last call didn't actually discard anything. + // this turned out to be a major bottleneck on Windows, each call blocking > 10ms if (discard) { discard &= nmrp_discard(args->sock); }