Skip to content

Commit

Permalink
Merge pull request #129 from nomme/connection_reset
Browse files Browse the repository at this point in the history
Handle ConnectionResetError when sending PING
  • Loading branch information
theunkn0wn1 authored Dec 15, 2019
2 parents 87c4e74 + 93c2488 commit 77d4e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydle/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ async def handle_forever(self):
try:
await self.rawmsg("PING", self.server_tag)
data = await self.connection.recv(timeout=self.READ_TIMEOUT)
except asyncio.TimeoutError:
except (asyncio.TimeoutError, ConnectionResetError) as e:
data = None

if not data:
Expand Down

0 comments on commit 77d4e1b

Please sign in to comment.