From 89c4aee29ea00fc6a4f929b99db8fa0c39a7cfb8 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Sat, 20 Jan 2024 20:54:46 -0500 Subject: [PATCH] Unlock mutex when failing to load model (#2117) --- llm/dyn_ext_server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/llm/dyn_ext_server.go b/llm/dyn_ext_server.go index f1b14ce7..2da2bb96 100644 --- a/llm/dyn_ext_server.go +++ b/llm/dyn_ext_server.go @@ -141,6 +141,7 @@ func newDynExtServer(library, model string, adapters, projectors []string, opts defer freeExtServerResp(initResp) C.dyn_llama_server_init(llm.s, &sparams, &initResp) if initResp.id < 0 { + mutex.Unlock() return nil, extServerResponseToErr(initResp) }