Skip to content

Commit

Permalink
Reset event when it is reused after a reconnect (Fixes #153)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Dec 10, 2019
1 parent 676a17a commit 179d0df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engineio/asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ async def _ping_loop(self):
self.pong_received = True
if self.ping_loop_event is None:
self.ping_loop_event = self.create_event()
else:
self.ping_loop_event.clear()
while self.state == 'connected':
if not self.pong_received:
self.logger.info(
Expand Down
2 changes: 2 additions & 0 deletions engineio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ def _ping_loop(self):
self.pong_received = True
if self.ping_loop_event is None:
self.ping_loop_event = self.create_event()
else:
self.ping_loop_event.clear()
while self.state == 'connected':
if not self.pong_received:
self.logger.info(
Expand Down

0 comments on commit 179d0df

Please sign in to comment.