Commit 660fedef authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

v1p: No timeout when timeout_pipe is zero

parent e0b164f9
......@@ -117,6 +117,7 @@ void
V1P_Process(const struct req *req, int fd, struct v1p_acct *v1a)
{
struct pollfd fds[2];
vtim_dur tmo;
int i, j;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
......@@ -142,8 +143,10 @@ V1P_Process(const struct req *req, int fd, struct v1p_acct *v1a)
while (fds[0].fd > -1 || fds[1].fd > -1) {
fds[0].revents = 0;
fds[1].revents = 0;
i = poll(fds, 2,
(int)(cache_param->pipe_timeout * 1e3));
tmo = cache_param->pipe_timeout;
if (tmo == 0.)
tmo = -1.;
i = poll(fds, 2, (int)(tmo * 1e3));
if (i < 1)
break;
if (fds[0].revents &&
......
varnishtest "pipe timeouts"
server s1 {
rxreq
txresp -hdr "transfer-encoding: chunked"
delay 1.1
} -start
varnish v1 -cliok "param.set pipe_timeout 0s"
varnish v1 -vcl+backend "" -start
logexpect l1 -v v1 -q "Timestamp:PipeSess[2] > 1.0" {
expect 1001 * ReqMethod PIPE
} -start
client c1 {
non_fatal
txreq -method PIPE
rxresp
} -run
logexpect l1 -wait
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