Browse Source

fix final

master
gsd 1 year ago
parent
commit
1e8c1d809b
  1. 8
      ws.py

8
ws.py

@ -26,7 +26,13 @@ class WS:
sys.exit(1)
else:
print(f"Run after setup {SERVICE_NAME}: {START_AFTER_CONNECT}")
addr = backend.replace("https://", "wss://")
addr = backend
if not "wss://" in addr:
addr = addr.replace("https://", "wss://")
if not "/ws/services" in addr:
addr += "/ws/services"
print(f"Connect to {addr}, secret len: {len(auth)}")
self.ws = websocket.WebSocketApp(addr, cookie="secretkey="+auth, on_close=self.on_close, on_open=self.on_open)

Loading…
Cancel
Save