Skip to content

Commit bfc342c

Browse files
committed
squash! server : add server_task_type field to server_task_result
Add a check for the server_task_type in the server.cpp file. This is to ensure that the server_task_type is correct when the server_task_type is SERVER_TASK_TYPE_SLOT_RESTORE. This is because the server_task_type is SERVER_TASK_TYPE_SLOT_SAVE when the server_task_type is SERVER_TASK_TYPE_SLOT_RESTORE.
1 parent c6f6579 commit bfc342c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/server/server.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3738,7 +3738,11 @@ int main(int argc, char ** argv) {
37383738
return;
37393739
}
37403740
GGML_ASSERT(result.get() != nullptr);
3741-
GGML_ASSERT(result.get()->get_server_task_type() == type);
3741+
if (type == SERVER_TASK_TYPE_SLOT_RESTORE) {
3742+
GGML_ASSERT(result.get()->get_server_task_type() == SERVER_TASK_TYPE_SLOT_SAVE);
3743+
} else {
3744+
GGML_ASSERT(result.get()->get_server_task_type() == type);
3745+
}
37423746
res_ok(res, result->to_json());
37433747
};
37443748

0 commit comments

Comments
 (0)