From 620a78aaa07af860fa02877ae9ec3fa0e6c5439c Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sat, 23 May 2026 01:07:28 +0900 Subject: [PATCH] Early return from log_queue_enqueue when not active --- bindings/ruby/ext/ruby_whisper_log.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bindings/ruby/ext/ruby_whisper_log.c b/bindings/ruby/ext/ruby_whisper_log.c index 615bf89d9..674421574 100644 --- a/bindings/ruby/ext/ruby_whisper_log.c +++ b/bindings/ruby/ext/ruby_whisper_log.c @@ -65,6 +65,11 @@ ruby_whisper_log_queue_enqueue(ruby_whisper_log_queue *log_queue, enum ggml_log_ { rb_nativethread_lock_lock(&log_queue->lock); + if (!log_queue->is_active) { + rb_nativethread_lock_unlock(&log_queue->lock); + return; + } + size_t len = strlen(text); ruby_whisper_log *log = &log_queue->logs[log_queue->head]; if (len > log->capacity) {