mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Revert "Make Connection.send() raise the actual exception"
This reverts commit ed2db45a03dc9a2391fee8f40e9ff059c109c291.
This commit is contained in:
parent
22f2b1dd99
commit
84b0e15e2b
@ -77,7 +77,10 @@ class Connection:
|
|||||||
log.info("Disconnected")
|
log.info("Disconnected")
|
||||||
|
|
||||||
async def send(self, data: bytes):
|
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]:
|
async def recv(self) -> Optional[bytes]:
|
||||||
return await self.protocol.recv()
|
return await self.protocol.recv()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user