From b0ecbec7ed8af602303f11edfd9709e36b5a1373 Mon Sep 17 00:00:00 2001 From: Mike Goslin Date: Sat, 9 Dec 2000 04:55:51 +0000 Subject: [PATCH] *** empty log message *** --- panda/src/downloader/downloader.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panda/src/downloader/downloader.cxx b/panda/src/downloader/downloader.cxx index 0904f7ef17..637632b5aa 100644 --- a/panda/src/downloader/downloader.cxx +++ b/panda/src/downloader/downloader.cxx @@ -572,12 +572,15 @@ download(const string &file_name, Filename file_dest, // Handle receive timeouts by trying again if (ans == RS_timeout) { + int extra_bytes = 0; for (int r = 0; r < downloader_timeout_retries; r++) { ans = safe_receive(_socket, status._next_in, read_size, - (long)downloader_timeout, bytes); + (long)downloader_timeout, extra_bytes); if (ans != RS_timeout) break; } + bytes += extra_bytes; + if (ans == RS_timeout) { // We've really timed out - throw an event downloader_cat.error()