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
ef217697
Commit
ef217697
authored
Oct 13, 2011
by
Poul-Henning Kamp
Committed by
Tollef Fog Heen
Feb 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quit early if setting blocking mode fails.
Submitted by: Nils Goroll
parent
09b66bd7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
cache_center.c
bin/varnishd/cache_center.c
+13
-6
No files found.
bin/varnishd/cache_center.c
View file @
ef217697
...
...
@@ -1575,14 +1575,21 @@ CNT_Session(struct sess *sp)
AZ
(
w
->
do_esi
);
/*
* Whenever we come in from the acceptor
we need to set blocking
* mode, but there is no point in setting it when we come from
* Whenever we come in from the acceptor
or waiter, we need to set
*
blocking
mode, but there is no point in setting it when we come from
* ESI or when a parked sessions returns.
* It would be simpler to do this in the acceptor, but we'd rather
* do the syscall in the worker thread.
* It would be simpler to do this in the acceptor or waiter, but we'd
* rather do the syscall in the worker thread.
* On systems which return errors for ioctl, we close early
*/
if
(
sp
->
step
==
STP_FIRST
||
sp
->
step
==
STP_START
)
(
void
)
VTCP_blocking
(
sp
->
fd
);
if
((
sp
->
step
==
STP_FIRST
||
sp
->
step
==
STP_START
)
&&
VTCP_blocking
(
sp
->
fd
))
{
if
(
errno
==
ECONNRESET
)
vca_close_session
(
sp
,
"remote closed"
);
else
vca_close_session
(
sp
,
"error"
);
sp
->
step
=
STP_DONE
;
}
/*
* NB: Once done is set, we can no longer touch sp!
...
...
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