diagnostics: ncd connect timer SET/FIRE logs + WSAEWOULDBLOCK fix + cm_invite_fail details

- u_async.c: log ncd_connect timer expiration calculation (tb, now_tb, exp_tb, exp_ms, delta_tb)
- node_conn_direct.c: SET logs at 4 timer creation points with value_tb/now_tb/path; TIMEOUT log with now_tb
- conn_mgr_core.c: cm_invite_fail entry log + CLOSE/SKIP branch detail
- stcp_client.c: fix WSAEWOULDBLOCK (10035) treated as error on Windows (add ERR_WOULDBLOCK check)
This commit is contained in:
Evgeny committed 2026-08-04 18:16:53 +03:00
1 parent 9d797c91eb
commit 2b10f53466
4 files changed
+26 -6

No files matched your search

+7
View File
@@ -553,8 +553,15 @@ void* uasync_set_timeout(struct UASYNC* ua, int timeout_tb, void* arg, timeout_c
// Calculate expiration time in milliseconds
struct timeval now;
get_current_time(&now);
uint64_t now_tb = (uint64_t)now.tv_sec * 10000ULL + (uint64_t)now.tv_usec / 100ULL;
timeval_add_tb(&now, timeout_tb);
node->expiration_ms = timeval_to_ms(&now);
if (name && strncmp(name, "ncd_connect", 11) == 0) {
uint64_t exp_tb = (uint64_t)now.tv_sec * 10000ULL + (uint64_t)now.tv_usec / 100ULL;
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "[uasync] set_timeout: name=%s tb=%d now_tb=%llu exp_tb=%llu exp_ms=%llu delta_tb=%llu",
name, timeout_tb, (unsigned long long)now_tb, (unsigned long long)exp_tb,
(unsigned long long)node->expiration_ms, (unsigned long long)(exp_tb - now_tb));
}
// Add to heap
if (timeout_heap_push(ua->timeout_heap, node->expiration_ms, node, &node->heap_index) != 0) {