mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-11 12:12:56 -03:00
Fixed crash when starting recieve mode server
This commit is contained in:
parent
0996e8c064
commit
406515085e
2 changed files with 17 additions and 2 deletions
|
@ -453,6 +453,7 @@ class Web(object):
|
||||||
"""
|
"""
|
||||||
Start the flask web server.
|
Start the flask web server.
|
||||||
"""
|
"""
|
||||||
|
self.common.log('Web', 'start', 'port={}, stay_open={}, persistent_slug={}'.format(port, stay_open, persistent_slug))
|
||||||
self.generate_slug(persistent_slug)
|
self.generate_slug(persistent_slug)
|
||||||
|
|
||||||
self.stay_open = stay_open
|
self.stay_open = stay_open
|
||||||
|
|
|
@ -34,6 +34,11 @@ class ReceiveMode(Mode):
|
||||||
"""
|
"""
|
||||||
# Create the Web object
|
# Create the Web object
|
||||||
self.web = Web(self.common, True, True)
|
self.web = Web(self.common, True, True)
|
||||||
|
|
||||||
|
# Server status
|
||||||
|
self.server_status.set_mode('receive')
|
||||||
|
#self.server_status.server_stopped.connect(self.update_primary_action)
|
||||||
|
#self.server_status.server_canceled.connect(self.update_primary_action)
|
||||||
|
|
||||||
# Tell server_status about web, then update
|
# Tell server_status about web, then update
|
||||||
self.server_status.web = self.web
|
self.server_status.web = self.web
|
||||||
|
@ -53,12 +58,21 @@ class ReceiveMode(Mode):
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def start_server_custom(self):
|
||||||
|
"""
|
||||||
|
Starting the server.
|
||||||
|
"""
|
||||||
|
# Reset web counters
|
||||||
|
self.web.error404_count = 0
|
||||||
|
|
||||||
|
# Hide and reset the downloads if we have previously shared
|
||||||
|
#self.downloads.reset_downloads()
|
||||||
|
#self.reset_info_counters()
|
||||||
|
|
||||||
def start_server_step2_custom(self):
|
def start_server_step2_custom(self):
|
||||||
"""
|
"""
|
||||||
Step 2 in starting the server.
|
Step 2 in starting the server.
|
||||||
"""
|
"""
|
||||||
# Set up web
|
|
||||||
|
|
||||||
# Continue
|
# Continue
|
||||||
self.starting_server_step3.emit()
|
self.starting_server_step3.emit()
|
||||||
self.start_server_finished.emit()
|
self.start_server_finished.emit()
|
||||||
|
|
Loading…
Reference in a new issue