Skip to content
Snippets Groups Projects
Commit 2c7d3844 authored by Dmitry Gerasimov's avatar Dmitry Gerasimov
Browse files

[*] Some fixes for node client

parent 5ad6528a
No related branches found
No related tags found
1 merge request!897hotfix-6925
Pipeline #16979 passed with stage
in 2 seconds
......@@ -167,12 +167,14 @@ static void s_stage_status_error_callback(dap_client_t *a_client, void *a_arg)
}
if (l_node_client->keep_connection) {
dap_events_socket_uuid_t *l_uuid = DAP_DUP(&l_node_client->uuid);
l_node_client->sync_timer = dap_timerfd_start_on_worker(l_node_client->stream_worker
? l_node_client->stream_worker->worker
: dap_events_worker_get_auto(),
s_timer_update_states * 1000,
if(l_node_client->stream_worker){
l_node_client->sync_timer = dap_timerfd_start_on_worker( l_node_client->stream_worker->worker
, s_timer_update_states * 1000,
s_timer_update_states_callback,
l_uuid);
}else{
log_it(L_ERROR,"After NODE_CLIENT_STATE_DISCONNECTED: Node client has no worker, too dangerous to run update states in alien context");
}
}
return;
}
......@@ -291,6 +293,7 @@ static bool s_timer_update_states_callback(void *a_arg)
DAP_DELETE(l_uuid);
return false;
}
DAP_DELETE(l_uuid);
return true;
}
......@@ -330,12 +333,16 @@ static void s_stage_connected_callback(dap_client_t *a_client, void *a_arg)
l_node_client->stream_worker = l_stream->stream_worker;
if (l_node_client->keep_connection) {
dap_events_socket_uuid_t *l_uuid = DAP_DUP(&l_node_client->uuid);
dap_worker_exec_callback_on(l_stream->esocket->context->worker, s_node_client_connected_synchro_start_callback, l_uuid);
dap_events_socket_uuid_t *l_uuid_timer = DAP_DUP(&l_node_client->uuid);
l_node_client->sync_timer = dap_timerfd_start_on_worker(l_stream->esocket->context->worker,
s_timer_update_states * 1000,
s_timer_update_states_callback,
l_uuid_timer);
if(l_node_client->stream_worker){
dap_worker_exec_callback_on(l_stream->esocket->context->worker, s_node_client_connected_synchro_start_callback, l_uuid);
l_node_client->sync_timer = dap_timerfd_start_on_worker(l_stream->esocket->context->worker,
s_timer_update_states * 1000,
s_timer_update_states_callback,
l_uuid_timer);
}else{
log_it(L_ERROR,"After NODE_CLIENT_STATE_ESTABLISHED: Node client has no worker, too dangerous to run update states in alien context");
}
}
}
#ifndef _WIN32
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment