From 0c19d39d8c0390c865f7f736283c984f19986895 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 24 Oct 2025 15:13:08 +0200 Subject: [PATCH] Set LogLevel as string and do not wait for bridge when destroying because it is a sync call --- codex/codex.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/codex/codex.go b/codex/codex.go index 78e8a2b..24495b4 100644 --- a/codex/codex.go +++ b/codex/codex.go @@ -92,7 +92,7 @@ const ( type Config struct { // Default: INFO - LogLevel LogLevel `json:"log-level,omitempty"` + LogLevel string `json:"log-level,omitempty"` // Specifies what kind of logs should be written to stdout // Default: auto @@ -280,8 +280,12 @@ func (node CodexNode) Destroy() error { return bridge.callError("cGoCodexDestroy") } - _, err = bridge.wait() - return err + // We don't wait for the bridge here. + // The destroy function does not call the worker thread, + // it destroys the context directly and return the return + // value synchronously. + + return nil } // Version returns the version of the Codex node.