Skip to content

Commit

Permalink
Fix for Python >= 3.12: Exit receive_loop immediately, if connection …
Browse files Browse the repository at this point in the history
…has already been closed
  • Loading branch information
Philip Stadermann committed Nov 10, 2023
1 parent 4220739 commit 3475a01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/src/vaas/vaas.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ def __response_message_for_guid(self, guid):
return result

async def __receive_loop(self):
websocket = self.get_authenticated_websocket()
try:
websocket = self.get_authenticated_websocket()
except VaasConnectionClosedError as e:
# Fix for Python >= 3.12: Connection has already been closed again. End loop.
return
try:
async for message in websocket:
vaas_message = json.loads(message)
Expand Down

0 comments on commit 3475a01

Please sign in to comment.