Skip attempt to shutdown AprEndpoint acceptor threads if the server socket has been already forcefully closed.
Reduce waiting timeout from 30s to 10s. I think if things go wrong 10s is enough to wait.
If it were waiting 30s
- the JVM itself might be forcefully closed by service wrapper as unresponsive.
- it must print something to the logs, otherwise it looks odd.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@
1176799 13f79535-47bb-0310-9956-
ffa450edef68
running = false;
unlockAccept();
for (int i = 0; i < acceptors.length; i++) {
- long s = System.currentTimeMillis() + 30000;
- while (acceptors[i].isAlive()) {
+ long s = System.currentTimeMillis() + 10000;
+ while (acceptors[i].isAlive() && serverSock != 0) {
try {
acceptors[i].interrupt();
acceptors[i].join(1000);