Skip to content

Commit

Permalink
Only attempt to set an async signal handler once (Fixes #276)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed May 25, 2022
1 parent ec7b3da commit 6869751
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engineio/asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ async def connect(self, url, headers=None, transports=None,
try:
asyncio.get_event_loop().add_signal_handler(
signal.SIGINT, async_signal_handler)
async_signal_handler_set = True
except NotImplementedError: # pragma: no cover
self.logger.warning('Signal handler is unsupported')
async_signal_handler_set = True

if self.state != 'disconnected':
raise ValueError('Client is not in a disconnected state')
Expand Down

0 comments on commit 6869751

Please sign in to comment.