mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Fix None first_query and TcpClient.disconnect()
This commit is contained in:
parent
f581db294a
commit
64dd957189
|
@ -84,8 +84,9 @@ class TcpClient:
|
|||
"""Closes the connection."""
|
||||
if self._socket is not None:
|
||||
try:
|
||||
self._socket.shutdown(socket.SHUT_RDWR)
|
||||
self._socket.close()
|
||||
except OSError:
|
||||
pass
|
||||
finally:
|
||||
self._socket = None
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ class MTProtoSender:
|
|||
|
||||
__log__.debug('Connection success!')
|
||||
if self.state.auth_key is None:
|
||||
self._is_first_query = True
|
||||
self._is_first_query = bool(self._first_query)
|
||||
_last_error = SecurityError()
|
||||
plain = MTProtoPlainSender(self._connection)
|
||||
for retry in range(1, self._retries + 1):
|
||||
|
|
Loading…
Reference in New Issue
Block a user