mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-10-31 16:07:44 +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.""" |         """Closes the connection.""" | ||||||
|         if self._socket is not None: |         if self._socket is not None: | ||||||
|             try: |             try: | ||||||
|                 self._socket.shutdown(socket.SHUT_RDWR) |  | ||||||
|                 self._socket.close() |                 self._socket.close() | ||||||
|  |             except OSError: | ||||||
|  |                 pass | ||||||
|             finally: |             finally: | ||||||
|                 self._socket = None |                 self._socket = None | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -215,7 +215,7 @@ class MTProtoSender: | ||||||
| 
 | 
 | ||||||
|         __log__.debug('Connection success!') |         __log__.debug('Connection success!') | ||||||
|         if self.state.auth_key is None: |         if self.state.auth_key is None: | ||||||
|             self._is_first_query = True |             self._is_first_query = bool(self._first_query) | ||||||
|             _last_error = SecurityError() |             _last_error = SecurityError() | ||||||
|             plain = MTProtoPlainSender(self._connection) |             plain = MTProtoPlainSender(self._connection) | ||||||
|             for retry in range(1, self._retries + 1): |             for retry in range(1, self._retries + 1): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user