Add timeout parameter on TcpClient.connect() too

This commit is contained in:
Lonami Exo
2017-06-22 19:21:33 +02:00
parent e4fbd87c75
commit 843c16215c
2 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -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