timeouts
All checks were successful
Deploy powerbar.ti Frontend Portal / Deploy-Tinance2-Frontend-Portal-Production (push) Successful in 35s

This commit is contained in:
Matthew Frost 2023-12-03 01:56:17 +01:00
parent 91c9d805b0
commit b510d19597

View file

@ -34,12 +34,17 @@ def run_telnet_command(powerbar, command):
try:
tn = get_telnet_connection(powerbar)
tn.write(f"{command}\r\n".encode('ascii'))
time.sleep(0.2)
tn.write(f"{command}\r\n".encode('ascii'))
return
except Exception as e:
print(f"Telnet error: {e}")
active_telnet_connections.pop(powerbar)
if powerbar in active_telnet_connections:
active_telnet_connections.pop(powerbar)
tn = get_telnet_connection(powerbar)
tn.write(f"{command}\r\n".encode('ascii'))
time.sleep(0.2)
tn.write(f"{command}\r\n".encode('ascii'))
return