mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Catch WebSocketException when attempting to reconnect
This commit is contained in:
parent
33a1ebdb1a
commit
be72693fec
1 changed files with 7 additions and 0 deletions
|
@ -121,9 +121,16 @@ def run():
|
|||
ws = create_connection(uri, header=header)
|
||||
logger.info(u"Tautulli WebSocket :: Ready")
|
||||
plexpy.WS_CONNECTED = True
|
||||
|
||||
except IOError as e:
|
||||
logger.info(u"Tautulli WebSocket :: %s." % e)
|
||||
|
||||
except (websocket.WebSocketException, Exception) as e:
|
||||
logger.error(u"Tautulli WebSocket :: %s." % e)
|
||||
plexpy.WS_CONNECTED = False
|
||||
ws_exception = True
|
||||
break
|
||||
|
||||
else:
|
||||
ws.shutdown()
|
||||
plexpy.WS_CONNECTED = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue