libs/multihttp.lua

changeset 3
0521ed5b2598
parent 0
6e60da4625db
child 4
a20981a6d88b
equal deleted inserted replaced
2:38f221e53215 3:0521ed5b2598
41 batch.urls[url] = 41 batch.urls[url] =
42 http.request(url, nil, function (data, status, request) 42 http.request(url, nil, function (data, status, request)
43 if batch.callback then 43 if batch.callback then
44 batch.downloading_count = batch.downloading_count - 1; 44 batch.downloading_count = batch.downloading_count - 1;
45 batch.callback(url, status, data, request); 45 batch.callback(url, status, data, request);
46 if batch.downloading_count == 0 and block then 46 if batch.downloading_count == 0 then
47 server.setquitting(true); 47 if block then
48 server.setquitting(true);
49 end
50 batch.status = "complete";
48 end 51 end
49 end 52 end
50 end); 53 end);
51 end 54 end
52 batch.download_count = count; 55 batch.download_count = count;

mercurial