Revert "Make Connection.send() raise the actual exception"

This reverts commit ed2db45a03.
This commit is contained in:
Dan 2022-02-10 20:14:09 +01:00
parent 22f2b1dd99
commit 84b0e15e2b

View file

@ -77,7 +77,10 @@ class Connection:
log.info("Disconnected")
async def send(self, data: bytes):
await self.protocol.send(data)
try:
await self.protocol.send(data)
except Exception:
raise OSError
async def recv(self) -> Optional[bytes]:
return await self.protocol.recv()