Skip to content

Commit

Permalink
Fix runtime error
Browse files Browse the repository at this point in the history
asyncio.run() creates a whole new loop for some reason, which is really stupid and dumb.
  • Loading branch information
tt2468 authored Dec 31, 2021
1 parent ff8f040 commit 84181db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion samples/sample_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ async def make_request():

await ws.disconnect() # Disconnect from the websocket server cleanly

asyncio.run(make_request())
loop = asyncio.get_event_loop()
loop.run_until_complete(make_request())

0 comments on commit 84181db

Please sign in to comment.