Explorar o código

update machine position when closing connection

Tuan Nguyen hai 11 meses
pai
achega
bfa2c07e06
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      dune_weaver_flask/modules/connection/connection_manager.py

+ 2 - 0
dune_weaver_flask/modules/connection/connection_manager.py

@@ -72,6 +72,7 @@ class SerialConnection(BaseConnection):
         return self.ser is not None and self.ser.is_open
 
     def close(self) -> None:
+        update_machine_position()
         with self.lock:
             if self.ser.is_open:
                 self.ser.close()
@@ -117,6 +118,7 @@ class WebSocketConnection(BaseConnection):
         return self.ws is not None
 
     def close(self) -> None:
+        update_machine_position()
         with self.lock:
             if self.ws:
                 self.ws.close()