We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38fd146 commit 6d22f93Copy full SHA for 6d22f93
1 file changed
src/relay_listener.py
@@ -16,6 +16,7 @@
16
17
from dotenv import load_dotenv
18
from websockets.asyncio.client import connect
19
+from websockets.frames import CloseCode
20
from websockets.exceptions import ConnectionClosedError
21
22
from services.mwl.create_worklist_item import CreateWorklistItem
@@ -139,7 +140,7 @@ async def main():
139
140
logger.warning("\nShutting down...")
141
break
142
except ConnectionClosedError as e:
- if "ExpiredToken" in str(e) and e.code == 1011:
143
+ if "ExpiredToken" in str(e) and e.code == CloseCode.INTERNAL_ERROR.value:
144
logger.info("SAS token expired, refreshing...")
145
else:
146
logger.warning(f"Connection closed with code {e.code}: {e.reason}")
0 commit comments