Stop read timer when download is cancelled

This commit is contained in:
Jay Kamat 2018-04-04 01:17:37 -04:00
parent 79823a9a0b
commit d0d5ad2eda
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -162,6 +162,7 @@ class DownloadItem(downloads.AbstractDownloadItem):
QTimer.singleShot(0, lambda: self._die(reply.errorString())) QTimer.singleShot(0, lambda: self._die(reply.errorString()))
def _do_cancel(self): def _do_cancel(self):
self._read_timer.stop()
if self._reply is not None: if self._reply is not None:
self._reply.finished.disconnect(self._on_reply_finished) self._reply.finished.disconnect(self._on_reply_finished)
self._reply.abort() self._reply.abort()