Verified Commit 0674b78f authored by Grigorii Demidov's avatar Grigorii Demidov Committed by Vladimír Čunát

daemon: restart client's tcp session timeout timer right after answer

parent 5c70b12d
Pipeline #32617 passed with stages
in 13 minutes and 41 seconds
......@@ -213,7 +213,7 @@ static void tcp_timeout_trigger(uv_timer_t *timer)
assert(session->outgoing == false);
if (session->tasks.len > 0) {
uv_timer_again(timer);
} else {
} else if (!session->closing) {
uv_timer_stop(timer);
worker_session_close(session);
}
......
......@@ -1412,6 +1412,11 @@ static int qr_task_finalize(struct qr_task *task, int state)
(void) qr_task_send(task, handle,
(struct sockaddr *)&ctx->source.addr,
ctx->req.answer);
if (handle->type == UV_TCP) {
/* Don't try to close source session at least
* retry_interval_for_timeout_timer milliseconds */
uv_timer_again(&ctx->source.session->timeout);
}
} else {
(void) qr_task_on_send(task, NULL, kr_error(EIO));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment