2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Make Connection.send() raise the actual exception

This commit is contained in:
Dan 2022-02-10 06:45:59 +01:00
parent dc6c816c80
commit ed2db45a03

View File

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