mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-11-01 00:17:47 +03:00 
			
		
		
		
	Fix automatic reconnect (e.g. on bad auth key)
This took more time than it should have to debug.
This commit is contained in:
		
							parent
							
								
									bc1fd9039d
								
							
						
					
					
						commit
						3fd7c33127
					
				|  | @ -14,6 +14,10 @@ class ConnectionTcpFull(Connection): | |||
|         super().__init__(ip, port, loop=loop) | ||||
|         self._send_counter = 0 | ||||
| 
 | ||||
|     async def connect(self): | ||||
|         await super().connect() | ||||
|         self._send_counter = 0  # Important or Telegram won't reply | ||||
| 
 | ||||
|     def _send(self, data): | ||||
|         # https://core.telegram.org/mtproto#tcp-transport | ||||
|         # total length, sequence number, packet and checksum (CRC32) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user