Unlock mutex when failing to load model (#2117)

This commit is contained in:
Jeffrey Morgan 2024-01-20 20:54:46 -05:00 committed by GitHub
parent f32ea81b21
commit 89c4aee29e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -141,6 +141,7 @@ func newDynExtServer(library, model string, adapters, projectors []string, opts
defer freeExtServerResp(initResp) defer freeExtServerResp(initResp)
C.dyn_llama_server_init(llm.s, &sparams, &initResp) C.dyn_llama_server_init(llm.s, &sparams, &initResp)
if initResp.id < 0 { if initResp.id < 0 {
mutex.Unlock()
return nil, extServerResponseToErr(initResp) return nil, extServerResponseToErr(initResp)
} }