Stopping a download
artemkloko opened this issue · 2 comments
artemkloko commented
In issue #33 in order to stop a download you propose
var downloader = new mtd(file, url, {
onStart: function (data) {
data.threads.each(function(i){
i.destroy();
});
}
});
Is it safe to just destroy the threads? I implemented your proposal and sometimes I get a corrupted mtd file, which cannot be resumed.
tusharmath commented
@rtmcached It shouldn't be a problem to destroy the threads at all. Killing a http request is a very legitimate operation. This is also done, automatically when a connection remains idle for more than 5 seconds.
artemkloko commented
I am on Lubuntu 14.04 x64 and it seems after implementing #43, the corrupted mtd files no longer appears