Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
4e5c8ab0
Commit
4e5c8ab0
authored
May 04, 2015
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fail gracefully if we can't get a backend on pipe
Fixes #1730
parent
a8d06513
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
cache_backend.c
bin/varnishd/cache/cache_backend.c
+4
-0
r01730.vtc
bin/varnishtest/tests/r01730.vtc
+15
-0
No files found.
bin/varnishd/cache/cache_backend.c
View file @
4e5c8ab0
...
@@ -277,6 +277,10 @@ vbe_dir_http1pipe(const struct director *d, struct req *req, struct busyobj *bo)
...
@@ -277,6 +277,10 @@ vbe_dir_http1pipe(const struct director *d, struct req *req, struct busyobj *bo)
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
i
=
vbe_dir_getfd
(
d
,
bo
);
i
=
vbe_dir_getfd
(
d
,
bo
);
if
(
i
<
0
)
{
VSLb
(
bo
->
vsl
,
SLT_FetchError
,
"no backend connection"
);
return
;
}
V1P_Process
(
req
,
bo
,
i
);
V1P_Process
(
req
,
bo
,
i
);
vbe_dir_finish
(
d
,
bo
->
wrk
,
bo
);
vbe_dir_finish
(
d
,
bo
->
wrk
,
bo
);
}
}
...
...
bin/varnishtest/tests/r01730.vtc
0 → 100644
View file @
4e5c8ab0
varnishtest "Test connection error on pipe"
varnish v1 -vcl {
backend default { .host = "${bad_ip}"; }
sub vcl_recv {
return (pipe);
}
} -start
client c1 {
txreq
expect_close
} -run
varnish v1 -expect sc_rx_timeout == 1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment