From de26cebdaca73d0c0d011f64adfe9fac38eed06f Mon Sep 17 00:00:00 2001 From: BiFangKNT <1320414964@qq.com> Date: Sun, 18 Oct 2026 19:29:36 +0800 Subject: [PATCH] fix(logging): make shutdown queue retry explicit --- src/langbot/pkg/core/bootutils/log.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/langbot/pkg/core/bootutils/log.py b/src/langbot/pkg/core/bootutils/log.py index 407b01fb6..3bf1bb5f6 100644 --- a/src/langbot/pkg/core/bootutils/log.py +++ b/src/langbot/pkg/core/bootutils/log.py @@ -136,7 +136,9 @@ class NonBlockingConsoleHandler(logging.Handler): self._queue.get_nowait() self.dropped_records += 1 except queue.Empty: - pass + # The writer consumed the last record after Full; + # retry inserting the shutdown sentinel. + continue self._worker.join(timeout=CONSOLE_CLOSE_TIMEOUT)