mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-02 06:26:10 -04:00
Force shutdowns the socket server on closing chat server
This commit is contained in:
parent
774e77ae51
commit
934136b345
1 changed files with 6 additions and 1 deletions
|
@ -360,13 +360,18 @@ class Web:
|
|||
# Shutdown the flask service
|
||||
try:
|
||||
func = request.environ.get("werkzeug.server.shutdown")
|
||||
if func is None:
|
||||
if func is None and self.mode != "chat":
|
||||
raise RuntimeError("Not running with the Werkzeug Server")
|
||||
func()
|
||||
except:
|
||||
pass
|
||||
|
||||
self.running = False
|
||||
|
||||
# If chat, shutdown the socket server
|
||||
if self.mode == "chat":
|
||||
self.socketio.stop()
|
||||
|
||||
def start(self, port):
|
||||
"""
|
||||
Start the flask web server.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue