Skip to content

Commit 949f773

Browse files
committed
Remove direct writer.close() call
Stop capturing and closing the WriteGear writer from the shutdown path. The change removes the local `writer` assignment and the try/except block that called `writer.close()`, avoiding potential double-close/race-condition exceptions during shutdown. The recorder closure is handled by the finally block calling _finalize_writer
1 parent 810b7e5 commit 949f773

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

dlclivegui/services/video_recorder.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ def stop(self) -> None:
228228
self._stop_event.set()
229229
q = self._queue
230230
t = self._writer_thread
231-
writer = self._writer
232231

233232
if q is not None:
234233
try:
@@ -256,12 +255,6 @@ def stop(self) -> None:
256255
)
257256
return
258257

259-
if writer is not None:
260-
try:
261-
writer.close()
262-
except Exception:
263-
logger.exception("Failed to close WriteGear cleanly")
264-
265258
self._save_timestamps()
266259

267260
with self._lifecycle_lock:

0 commit comments

Comments
 (0)