Skip to content

Commit

Permalink
fix close but scheduler shutdowned
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine TRAN committed Dec 4, 2023
1 parent 161ebda commit bd4eb71
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fastapi_websocket_rpc/websocket_rpc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ async def recv(self):
async def close(self, code: int = 1000):
if self._websocket is not None:
# Case opened, we have something to close.
#await asyncio.get_event_loop().run_in_executor(None, self._websocket.close,code)
self._websocket.close(code)

async def handle_exception(self, exception: Exception):
Expand Down Expand Up @@ -126,7 +125,7 @@ async def recv(self):
async def close(self, code: int = 1000):
if self._websocket is not None:
# Case opened, we have something to close.
await self._websocket.close(code)
self._websocket.close(code)

async def handle_exception(self, exception: Exception):
try:
Expand Down

0 comments on commit bd4eb71

Please sign in to comment.