mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Remove connection attempts from inital websocket connection
This commit is contained in:
parent
1da4b8ecb4
commit
c0f1079b4e
1 changed files with 1 additions and 11 deletions
|
@ -147,17 +147,7 @@ def run():
|
|||
|
||||
# Try an open the websocket connection
|
||||
while not plexpy.WS_CONNECTED and reconnects < plexpy.CONFIG.WEBSOCKET_CONNECTION_ATTEMPTS:
|
||||
if reconnects == 0:
|
||||
logger.info(u"Tautulli WebSocket :: Opening %swebsocket." % secure)
|
||||
|
||||
reconnects += 1
|
||||
|
||||
# Sleep 5 between connection attempts
|
||||
if reconnects > 1:
|
||||
time.sleep(plexpy.CONFIG.WEBSOCKET_CONNECTION_TIMEOUT)
|
||||
|
||||
logger.info(u"Tautulli WebSocket :: Connection attempt %s." % str(reconnects))
|
||||
|
||||
try:
|
||||
plexpy.WEBSOCKET = create_connection(uri, header=header)
|
||||
logger.info(u"Tautulli WebSocket :: Ready")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue