mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
Fix ConnectionResetError when only ping task (#24)
This commit is contained in:
parent
83a89e79de
commit
d505b2f372
@ -285,7 +285,10 @@ class Session:
|
|||||||
ping_id=0, disconnect_delay=self.WAIT_TIMEOUT + 10
|
ping_id=0, disconnect_delay=self.WAIT_TIMEOUT + 10
|
||||||
), False
|
), False
|
||||||
)
|
)
|
||||||
except (OSError, RPCError):
|
except OSError:
|
||||||
|
self.loop.create_task(self.restart())
|
||||||
|
break
|
||||||
|
except RPCError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
log.info("PingTask stopped")
|
log.info("PingTask stopped")
|
||||||
|
Loading…
Reference in New Issue
Block a user