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

This commit is contained in:
Matthew Frost 2024-02-01 23:55:25 +01:00
parent 701c5d90cd
commit 4c4c6ba545
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -5,7 +5,7 @@ from app.settings import powerbars, groups
def check_input_error(tn): def check_input_error(tn):
tn.write("/\r\n".encode('ascii')) tn.write("/\r\n".encode('ascii'))
for _ in range(3): for _ in range(3):
print(f"Checking for input error attempt ${_}") print(f"Checking for input error attempt {_}")
output = tn.read_until(b"Input error", timeout=3).decode('ascii') output = tn.read_until(b"Input error", timeout=3).decode('ascii')
if "Input error" in output: if "Input error" in output:
return True return True