Skip to content

Commit 3f8783c

Browse files
committed
Add back in the check that the parent is still alive, just in case
1 parent 0bb90d8 commit 3f8783c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simvue/worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ def run(self):
145145
pass
146146
buffer = []
147147

148-
if self._shutdown_event.is_set():
148+
if self._shutdown_event.is_set() or not self._parent_thread.is_alive():
149149
if self._metrics_queue.empty() and self._events_queue.empty():
150150
sys.exit(0)
151151
else:
152152
counter = 0
153-
while counter < POLLING_INTERVAL and not self._shutdown_event.is_set():
153+
while counter < POLLING_INTERVAL and not self._shutdown_event.is_set() and self._parent_thread.is_alive():
154154
time.sleep(1)
155155
counter += 1

0 commit comments

Comments
 (0)