Browse Source

Unlock mutex when failing to load model (#2117)

Jeffrey Morgan 1 year ago
parent
commit
89c4aee29e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      llm/dyn_ext_server.go

+ 1 - 0
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)
 	}