Răsfoiți Sursa

Fix init order with threading (#3935)

Engel Nyst 1 an în urmă
părinte
comite
e3be71f523
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      openhands/runtime/client/runtime.py

+ 1 - 1
openhands/runtime/client/runtime.py

@@ -51,11 +51,11 @@ class LogBuffer:
 
         self.buffer: list[str] = []
         self.lock = threading.Lock()
+        self._stop_event = threading.Event()
         self.log_generator = container.logs(stream=True, follow=True)
         self.log_stream_thread = threading.Thread(target=self.stream_logs)
         self.log_stream_thread.daemon = True
         self.log_stream_thread.start()
-        self._stop_event = threading.Event()
 
     def append(self, log_line: str):
         with self.lock: