mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 19:03:46 +03:00
Merge pull request #8 from MuallimCh/patch-1
Update tcp_transport.py to increment send_counter in case it fails
This commit is contained in:
commit
b52cb12b2a
|
@ -28,8 +28,8 @@ class TcpTransport:
|
||||||
crc = crc32(writer.get_bytes())
|
crc = crc32(writer.get_bytes())
|
||||||
writer.write_int(crc, signed=False)
|
writer.write_int(crc, signed=False)
|
||||||
|
|
||||||
self.tcp_client.write(writer.get_bytes())
|
|
||||||
self.send_counter += 1
|
self.send_counter += 1
|
||||||
|
self.tcp_client.write(writer.get_bytes())
|
||||||
|
|
||||||
def receive(self, timeout=timedelta(seconds=5)):
|
def receive(self, timeout=timedelta(seconds=5)):
|
||||||
"""Receives a TCP message (tuple(sequence number, body)) from the connected peer.
|
"""Receives a TCP message (tuple(sequence number, body)) from the connected peer.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user