From 904c6c0f6aee97149716fab20a017bc98ac7d955 Mon Sep 17 00:00:00 2001 From: Anton Grigoryev Date: Wed, 11 Mar 2015 20:06:53 +0300 Subject: [PATCH] Some comments to continue tomorrow --- mtproto.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mtproto.py b/mtproto.py index d077fbbe..7584062c 100644 --- a/mtproto.py +++ b/mtproto.py @@ -174,14 +174,12 @@ class Session: """ Reading socket and receiving message from server. Check the CRC32 and """ - packet_length_data = self.sock.recv(4) + packet_length_data = self.sock.recv(4) # reads how many bytes to read + if len(packet_length_data) > 0: # if we have smth. in the socket packet_length = struct.unpack("