mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Fix Connection abstraction leak
This commit is contained in:
@@ -8,10 +8,8 @@ class ConnectionTcpIntermediate(Connection):
|
||||
Intermediate mode between `ConnectionTcpFull` and `ConnectionTcpAbridged`.
|
||||
Always sends 4 extra bytes for the packet length.
|
||||
"""
|
||||
async def connect(self, timeout=None, ssl=None):
|
||||
await super().connect(timeout=timeout, ssl=ssl)
|
||||
def _init_conn(self):
|
||||
self._writer.write(b'\xee\xee\xee\xee')
|
||||
await self._writer.drain()
|
||||
|
||||
def _send(self, data):
|
||||
self._writer.write(struct.pack('<i', len(data)) + data)
|
||||
|
Reference in New Issue
Block a user