Skip to content

Commit 081d72d

Browse files
committed
fix task_id not set correctly
1 parent 240ea24 commit 081d72d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/server/server.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3782,7 +3782,7 @@ int main(int argc, char ** argv) {
37823782
int task_id = ctx_server.queue_tasks.get_new_id();
37833783
{
37843784
server_task task(SERVER_TASK_TYPE_SLOT_SAVE);
3785-
task.id = ctx_server.queue_tasks.get_new_id();
3785+
task.id = task_id;
37863786
task.slot_action.slot_id = id_slot;
37873787
task.slot_action.filename = filename;
37883788
task.slot_action.filepath = filepath;
@@ -3814,7 +3814,7 @@ int main(int argc, char ** argv) {
38143814
int task_id = ctx_server.queue_tasks.get_new_id();
38153815
{
38163816
server_task task(SERVER_TASK_TYPE_SLOT_RESTORE);
3817-
task.id = ctx_server.queue_tasks.get_new_id();
3817+
task.id = task_id;
38183818
task.slot_action.slot_id = id_slot;
38193819
task.slot_action.filename = filename;
38203820
task.slot_action.filepath = filepath;
@@ -3839,7 +3839,7 @@ int main(int argc, char ** argv) {
38393839
int task_id = ctx_server.queue_tasks.get_new_id();
38403840
{
38413841
server_task task(SERVER_TASK_TYPE_SLOT_ERASE);
3842-
task.id = ctx_server.queue_tasks.get_new_id();
3842+
task.id = task_id;
38433843
task.slot_action.slot_id = id_slot;
38443844

38453845
ctx_server.queue_results.add_waiting_task_id(task_id);

0 commit comments

Comments
 (0)