mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2026-09-06 17:02:07 +00:00
Add timeout parameter on TcpClient.connect() too
This commit is contained in:
@@ -18,7 +18,8 @@ class TcpTransport:
|
||||
def connect(self):
|
||||
"""Connects to the specified IP address and port"""
|
||||
self.send_counter = 0
|
||||
self.tcp_client.connect(self.ip, self.port)
|
||||
self.tcp_client.connect(self.ip, self.port,
|
||||
timeout=round(self.timeout.seconds))
|
||||
|
||||
def is_connected(self):
|
||||
return self.tcp_client.connected
|
||||
|
||||
Reference in New Issue
Block a user