mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 14:04:51 +00:00
Make Connection.send() raise the actual exception
This commit is contained in:
parent
dc6c816c80
commit
ed2db45a03
1 changed files with 1 additions and 4 deletions
|
|
@ -77,10 +77,7 @@ class Connection:
|
||||||
log.info("Disconnected")
|
log.info("Disconnected")
|
||||||
|
|
||||||
async def send(self, data: bytes):
|
async def send(self, data: bytes):
|
||||||
try:
|
|
||||||
await self.protocol.send(data)
|
await self.protocol.send(data)
|
||||||
except Exception:
|
|
||||||
raise OSError
|
|
||||||
|
|
||||||
async def recv(self) -> Optional[bytes]:
|
async def recv(self) -> Optional[bytes]:
|
||||||
return await self.protocol.recv()
|
return await self.protocol.recv()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue