Skip to content
Snippets Groups Projects

Bugs 4073 2

Merged Constantin P. requested to merge bugs-4073-2 into master
2 files
+ 11
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -119,10 +119,14 @@ static bool s_timer_timeout_check(void * a_arg)
@@ -119,10 +119,14 @@ static bool s_timer_timeout_check(void * a_arg)
dap_events_t * l_events = dap_events_get_default();
dap_events_t * l_events = dap_events_get_default();
assert(l_events);
assert(l_events);
dap_worker_t * l_worker =(dap_worker_t*) pthread_getspecific(l_events->pth_key_worker);; // We're in own esocket context
dap_worker_t * l_worker =(dap_worker_t*) pthread_getspecific(l_events->pth_key_worker); // We're in own esocket context
assert(l_worker);
assert(l_worker);
if(dap_events_socket_check_unsafe(l_worker, l_es) ){
if(dap_events_socket_check_unsafe(l_worker, l_es) ){
 
if ((l_es->type != DESCRIPTOR_TYPE_SOCKET) && (l_es->type != DESCRIPTOR_TYPE_SOCKET_UDP)) {
 
log_it(L_CRITICAL, "Timer esocket wrong argument: socket %d type %d, ignore this timeout...", l_es->socket, l_es->type);
 
return false;
 
}
dap_client_http_pvt_t * l_http_pvt = PVT(l_es);
dap_client_http_pvt_t * l_http_pvt = PVT(l_es);
log_it(L_WARNING,"Connection timeout for request http://%s:%u/%s, possible network problems or host is down",
log_it(L_WARNING,"Connection timeout for request http://%s:%u/%s, possible network problems or host is down",
l_http_pvt->uplink_addr, l_http_pvt->uplink_port, l_http_pvt->path);
l_http_pvt->uplink_addr, l_http_pvt->uplink_port, l_http_pvt->path);
@@ -131,7 +135,11 @@ static bool s_timer_timeout_check(void * a_arg)
@@ -131,7 +135,11 @@ static bool s_timer_timeout_check(void * a_arg)
l_http_pvt->were_callbacks_called = true;
l_http_pvt->were_callbacks_called = true;
}
}
l_http_pvt->is_closed_by_timeout = true;
l_http_pvt->is_closed_by_timeout = true;
l_es->flags |= DAP_SOCK_SIGNAL_CLOSE;
log_it(L_INFO, "Close %s sock %u type %d by timeout",
 
l_es->remote_addr_str ? l_es->remote_addr_str : "", l_es->socket, l_es->type);
 
dap_events_socket_remove_and_delete_unsafe(l_es, true);
 
} else {
 
log_it(L_INFO, "Socket %d type %d already disposed", l_es->socket, l_es->type);
}
}
return false;
return false;
}
}
Loading