Lines 1-25
Link Here
|
1 |
--- src/comm/TcpAcceptor.cc.orig 2018-10-27 20:44:55 UTC |
|
|
2 |
+++ src/comm/TcpAcceptor.cc |
3 |
@@ -297,6 +297,7 @@ Comm::TcpAcceptor::acceptOne() |
4 |
if (intendedForUserConnections()) |
5 |
logAcceptError(newConnDetails); |
6 |
notify(flag, newConnDetails); |
7 |
+ // XXX: Will not stop because doAccept() is not called asynchronously. |
8 |
mustStop("Listener socket closed"); |
9 |
return; |
10 |
} |
11 |
@@ -366,11 +367,12 @@ Comm::TcpAcceptor::oldAccept(Comm::Conne |
12 |
|
13 |
PROF_stop(comm_accept); |
14 |
|
15 |
- if (ignoreErrno(errcode)) { |
16 |
+ if (ignoreErrno(errcode) || errcode == ECONNABORTED) { |
17 |
debugs(50, 5, status() << ": " << xstrerr(errcode)); |
18 |
return Comm::NOMESSAGE; |
19 |
- } else if (ENFILE == errno || EMFILE == errno) { |
20 |
+ } else if (errcode == ENFILE || errcode == EMFILE) { |
21 |
debugs(50, 3, status() << ": " << xstrerr(errcode)); |
22 |
+ // XXX: These errors do not imply that we should stop listening. |
23 |
return Comm::COMM_ERROR; |
24 |
} else { |
25 |
debugs(50, DBG_IMPORTANT, MYNAME << status() << ": " << xstrerr(errcode)); |