mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-29 01:06:16 -05:00
#468 If the server is stopped before a download is completed, emit the Canceled message in the progress bar
This commit is contained in:
parent
4387589b4f
commit
5edd4dd22c
@ -376,9 +376,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||
if self.new_download:
|
||||
self.vbar.setValue(self.vbar.maximum())
|
||||
self.new_download = False
|
||||
# only check for requests if the server is running
|
||||
if self.server_status.status != self.server_status.STATUS_STARTED:
|
||||
return
|
||||
|
||||
events = []
|
||||
|
||||
@ -415,6 +412,9 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||
# close on finish?
|
||||
if not web.get_stay_open():
|
||||
self.server_status.stop_server()
|
||||
else:
|
||||
if self.server_status.status == self.server_status.STATUS_STOPPED:
|
||||
self.downloads.cancel_download(event["data"]["id"])
|
||||
|
||||
elif event["type"] == web.REQUEST_CANCELED:
|
||||
self.downloads.cancel_download(event["data"]["id"])
|
||||
|
Loading…
Reference in New Issue
Block a user