Skip to content

Commit

Permalink
explicitly disable the send deadline on the backend side
Browse files Browse the repository at this point in the history
As @dridi and myself concluded, the send_timeout had no effect on
backend connections anyway because we never set SO_SNDTIMEO (aka
idle_send_timeout on the client side) on backend connections.

With the next commit, we will fix the send_timeout on the client side and
thus would also enable it for "dripping" writes on the backend side.

To preserve existing behavior for the time being, we explicitly disable
the timeout (actually deadline) on the backend side. There is ongoing
work in progress to rework all of our timeouts for 7.x.

Implementation note: if (VTIM_real() > v1l->deadline) evaluates to false
for v1l->deadline == NaN

Ref varnishcache#3189
  • Loading branch information
nigoroll committed Mar 3, 2020
1 parent f1c47e4 commit 9201fdb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/varnishd/http1/cache_http1_fetch.c
Expand Up @@ -97,9 +97,8 @@ V1F_SendReq(struct worker *wrk, struct busyobj *bo, uint64_t *ctr_hdrbytes,
}

VTCP_blocking(*htc->rfd); /* XXX: we should timeout instead */
/* XXX: what is the right timeout ? Isn't send_timeout client side? */
V1L_Open(wrk, wrk->aws, htc->rfd, bo->vsl,
bo->t_prev + cache_param->send_timeout, 0);
/* XXX: need a send_timeout for the backend side */
V1L_Open(wrk, wrk->aws, htc->rfd, bo->vsl, nan(""), 0);
hdrbytes = HTTP1_Write(wrk, hp, HTTP1_Req);

/* Deal with any message-body the request might (still) have */
Expand Down

0 comments on commit 9201fdb

Please sign in to comment.