Skip to content

Commit

Permalink
Stop event loop when client is interrupted with Ctrl-C (Fixes #197)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Nov 27, 2020
1 parent 2fb1774 commit 402402f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions engineio/asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def async_signal_handler():
Disconnect all active async clients.
"""
async def _handler():
asyncio.get_event_loop().stop()
for c in client.connected_clients[:]:
if c.is_asyncio_based():
await c.disconnect()
Expand Down

0 comments on commit 402402f

Please sign in to comment.