mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Close websocket cleanly on shutdown
This commit is contained in:
parent
9905ebc144
commit
7362dd0bf4
2 changed files with 33 additions and 20 deletions
|
@ -46,6 +46,7 @@ import notifiers
|
|||
import plextv
|
||||
import users
|
||||
import versioncheck
|
||||
import web_socket
|
||||
import plexpy.config
|
||||
|
||||
PROG_DIR = None
|
||||
|
@ -95,6 +96,7 @@ HTTP_ROOT = None
|
|||
|
||||
DEV = False
|
||||
|
||||
WEBSOCKET = None
|
||||
WS_CONNECTED = False
|
||||
PLEX_SERVER_UP = None
|
||||
|
||||
|
@ -1622,6 +1624,10 @@ def upgrade():
|
|||
def shutdown(restart=False, update=False, checkout=False):
|
||||
cherrypy.engine.exit()
|
||||
|
||||
# Shutdown the websocket connection
|
||||
if WEBSOCKET:
|
||||
web_socket.shutdown()
|
||||
|
||||
if SCHED.running:
|
||||
SCHED.shutdown(wait=False)
|
||||
if activity_handler.ACTIVITY_SCHED.running:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue