Raise OSError in case "send" fails
This commit is contained in:
parent
52354b93d0
commit
5d58ff2d94
@ -64,7 +64,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) -> bytes or None:
|
||||
return await self.protocol.recv()
|
||||
|
Loading…
Reference in New Issue
Block a user