mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Fix close an already reset connection
This commit is contained in:
@ -55,4 +55,8 @@ class RawConnection(IRawConnection):
|
||||
self.writer.close()
|
||||
if sys.version_info < (3, 7):
|
||||
return
|
||||
await self.writer.wait_closed()
|
||||
try:
|
||||
await self.writer.wait_closed()
|
||||
# In case the connection is already reset.
|
||||
except (ConnectionResetError, RawConnError):
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user