Commit 7219255e authored by Michael König's avatar Michael König

fixed "Retry to connect to server"

parent 853f5264
......@@ -44,14 +44,13 @@ class SocketInput(InputBase):
else:
print("Socket created.")
while True:
try:
self.socket.connect((str(self.logServerIp), self.logServerPort))
print("Successfully connected to " + self.dst + "")
return
except socket.error:
print("\
Error: Could not connect to " + self.dst + "\
Retrying in " + str(LOGSERVER_CONNECT_RETRY_TIME) + "s ...\
")
print("Error: Could not connect to " + self.dst + ". Retrying in " + str(LOGSERVER_CONNECT_RETRY_TIME) + "s ...")
time.sleep(LOGSERVER_CONNECT_RETRY_TIME)
else:
pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment