mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Update tcp.py
This commit is contained in:
parent
ebe1f3433f
commit
7c58bb34af
1 changed files with 2 additions and 2 deletions
|
|
@ -456,7 +456,7 @@ class TCP:
|
|||
try:
|
||||
self.writer.close()
|
||||
await asyncio.wait_for(self.writer.wait_closed(), self.TIMEOUT)
|
||||
except Exception:
|
||||
except (OSError, asyncio.TimeoutError):
|
||||
pass
|
||||
|
||||
async def send(self, data: bytes) -> None:
|
||||
|
|
@ -468,7 +468,7 @@ class TCP:
|
|||
try:
|
||||
self.writer.write(data)
|
||||
await self.writer.drain()
|
||||
except Exception as e:
|
||||
except (OSError, asyncio.TimeoutError) as e:
|
||||
raise OSError(e)
|
||||
|
||||
async def recv(self, length: int = 0) -> Optional[bytes]:
|
||||
|
|
|
|||
Loading…
Reference in a new issue