|
|
|
|
@ -837,8 +837,8 @@ static void ca_timeout_cb(void* arg) {
|
|
|
|
|
if (st->delivered || st->cancelled) return; |
|
|
|
|
st->timers[ctx->addr_index] = NULL; |
|
|
|
|
st->pending_count--; |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_CONNECTIVITY, "%s: auto_connect TIMEOUT idx=%d pending=%d/%d peer=0x%016llx", |
|
|
|
|
CC_ID, ctx->addr_index, st->pending_count, st->addr_count, (unsigned long long)st->node_id); |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_CONNECTIVITY, "%s: auto_connect TIMEOUT idx=%d pending=%d/%d peer=0x%016llx", |
|
|
|
|
CC_ID, ctx->addr_index, st->pending_count, st->addr_count, (unsigned long long)st->node_id); |
|
|
|
|
if (st->pending_count <= 0 && !st->delivered) { |
|
|
|
|
st->delivered = 1; |
|
|
|
|
st->result_cb(CONN_MGR_ERR_TIMEOUT, st->node_id, st->result_arg); |
|
|
|
|
@ -849,8 +849,8 @@ void chat_core_connect_auto_cancel(void* state) {
|
|
|
|
|
if (!state) return; |
|
|
|
|
struct ca_state* st = (struct ca_state*)state; |
|
|
|
|
st->cancelled = 1; |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_CONNECTIVITY, "%s: auto_connect CANCELLED peer=0x%016llx", |
|
|
|
|
CC_ID, (unsigned long long)st->node_id); |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_CONNECTIVITY, "%s: auto_connect CANCELLED peer=0x%016llx", |
|
|
|
|
CC_ID, (unsigned long long)st->node_id); |
|
|
|
|
for (int i = 0; i < st->addr_count; i++) { |
|
|
|
|
if (st->timers[i]) { uasync_cancel_timeout(st->inst->ua, st->timers[i]); st->timers[i] = NULL; } |
|
|
|
|
if (st->conns[i]) { etcp_connection_close(st->conns[i]); st->conns[i] = NULL; } |
|
|
|
|
|