multihttp: Don't renew timer for progress callback after download completion

Sat, 02 Jan 2010 06:06:19 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 02 Jan 2010 06:06:19 +0000
changeset 4
a20981a6d88b
parent 3
0521ed5b2598
child 5
053850e0624b

multihttp: Don't renew timer for progress callback after download completion

libs/multihttp.lua file | annotate | diff | comparison | revisions
--- a/libs/multihttp.lua	Sat Jan 02 06:05:26 2010 +0000
+++ b/libs/multihttp.lua	Sat Jan 02 06:06:19 2010 +0000
@@ -18,7 +18,7 @@
 	timer.add_task(delay, function ()
 		if batch.progress_callback then
 			batch.progress_callback(batch);
-			if batch.progress_callback then
+			if batch.progress_callback and batch.status ~= "complete" then
 				return delay;
 			end
 		end

mercurial