Skip to content

Commit

Permalink
Missing timeout when closing websocket connection (Fixes #148)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Dec 11, 2019
1 parent 6534d32 commit 02a2c70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion engineio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def _ping_loop(self):
self.logger.info(
'PONG response has not been received, aborting')
if self.ws:
self.ws.shutdown()
self.ws.close(timeout=0)
self.queue.put(None)
break
self.pong_received = False
Expand Down
2 changes: 1 addition & 1 deletion tests/common/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def fake_wait(timeout):
c._ping_loop()
self.assertEqual(c.state, 'connected')
c.queue.put.assert_called_once_with(None)
c.ws.shutdown.assert_called_once_with()
c.ws.close.assert_called_once_with(timeout=0)

def test_read_loop_polling_disconnected(self):
c = client.Client()
Expand Down

0 comments on commit 02a2c70

Please sign in to comment.