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
d92ca508
Commit
d92ca508
authored
Feb 19, 2024
by
Asad Sajjad Ahmed
Committed by
Dridi Boukelmoune
Mar 01, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
varnishd: always shutdown both ends to a backend
Signed-off-by:
Asad Sajjad Ahmed
<
asadsa@varnish-software.com
>
parent
55fecc94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
cache_conn_pool.c
bin/varnishd/cache/cache_conn_pool.c
+1
-1
b00083.vtc
bin/varnishtest/tests/b00083.vtc
+47
-0
No files found.
bin/varnishd/cache/cache_conn_pool.c
View file @
d92ca508
...
...
@@ -231,7 +231,7 @@ VCP_Rel(struct conn_pool **cpp)
cp
->
n_conn
--
;
assert
(
pfd
->
state
==
PFD_STATE_AVAIL
);
pfd
->
state
=
PFD_STATE_CLEANUP
;
(
void
)
shutdown
(
pfd
->
fd
,
SHUT_WR
);
(
void
)
shutdown
(
pfd
->
fd
,
SHUT_
RD
WR
);
cp
->
n_kill
++
;
}
while
(
cp
->
n_kill
)
{
...
...
bin/varnishtest/tests/b00083.vtc
0 → 100644
View file @
d92ca508
varnishtest "VCP FIN-WAIT2"
server s1 {
rxreq
txresp
# Leave the TCP connection open in the FIN-WAIT2 state
delay 1000
} -start
server s2 {
rxreq
txresp
} -start
varnish v1 -vcl {
backend s1 {
.host = "${s1_sock}";
}
} -start
# The waiter depend on the backend_idle_timeout for when to give up and
# close the connection, so bump it up a bit.
varnish v1 -cliok "param.set backend_idle_timeout 120"
# The shutdown is done on the CLI thread, and it blocks until the waiter has
# killed the connection. So bump cli_timeout up as well
varnish v1 -cliok "param.set cli_timeout 120"
client c1 {
txreq -url "/"
rxresp
} -run
varnish v1 -vcl {
backend s2 {
.host = "${s2_sock}";
}
}
varnish v1 -cliok "vcl.use vcl2"
varnish v1 -cliok "vcl.discard vcl1"
varnish v1 -expect n_backend == 1
varnish v1 -expect backend_conn == 1
varnish v1 -expect backend_reuse == 0
varnish v1 -expect backend_recycle == 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