Browse Source

Unlock mutex when failing to load model (#2117)

Jeffrey Morgan 1 năm trước cách đây
mục cha
commit
89c4aee29e
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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)
 	}