Skip to content

Commit 84b0e15

Browse files
committed
Revert "Make Connection.send() raise the actual exception"
This reverts commit ed2db45.
1 parent 22f2b1d commit 84b0e15

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pyrogram/connection/connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ def close(self):
7777
log.info("Disconnected")
7878

7979
async def send(self, data: bytes):
80-
await self.protocol.send(data)
80+
try:
81+
await self.protocol.send(data)
82+
except Exception:
83+
raise OSError
8184

8285
async def recv(self) -> Optional[bytes]:
8386
return await self.protocol.recv()

0 commit comments

Comments
 (0)