Skip to content

Commit

Permalink
Fix: reset state on reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckierDodge committed Oct 10, 2023
1 parent 77c3467 commit 6b750d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/ot2_rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def connect_robot():
try:
print(ip)
ot2 = OT2_Driver(OT2_Config(ip=ip))
state = "IDLE"

except ConnectTimeoutError as connection_err:
state = "ERROR"
Expand Down Expand Up @@ -219,7 +220,6 @@ async def lifespan(app: FastAPI):
check_resources_folder()
check_protocols_folder()
connect_robot()
state = "IDLE"
yield
pass

Expand Down

0 comments on commit 6b750d1

Please sign in to comment.