mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-10 08:14:35 +00:00
server: fix bugs
This commit is contained in:
parent
0cf87c8837
commit
b019a707b8
3 changed files with 13 additions and 5 deletions
|
@ -760,6 +760,8 @@ struct server_context {
|
|||
llama_free (llama_init_dft.context);
|
||||
llama_free_model(llama_init_dft.model);
|
||||
|
||||
model_dft = nullptr;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3566,6 +3568,8 @@ int main(int argc, char ** argv) {
|
|||
LOG_INF("%s: loading model\n", __func__);
|
||||
|
||||
if (!ctx_server.load_model(params)) {
|
||||
char * stop_signal = nullptr;
|
||||
llama_free_sockets(ctx_server.ctx, &stop_signal);
|
||||
clean_up();
|
||||
t.join();
|
||||
LOG_ERR("%s: exiting due to model loading error\n", __func__);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue