SocketWrapper<Socket> wrapper = new SocketWrapper<Socket>(socket);
wrapper.setKeepAliveLeft(getMaxKeepAliveRequests());
// During shutdown, executor may be null - avoid NPE
- if (running) {
- getExecutor().execute(new SocketProcessor(wrapper));
- return true;
+ if (!running) {
+ return false;
}
- return false;
+ getExecutor().execute(new SocketProcessor(wrapper));
} catch (RejectedExecutionException x) {
log.warn("Socket processing request was rejected for:"+socket,x);
return false;
log.error(sm.getString("endpoint.process.fail"), t);
return false;
}
+ return true;
}
Thread.currentThread().setContextClassLoader(
getClass().getClassLoader());
}
+ // During shutdown, executor may be null - avoid NPE
+ if (!running) {
+ return false;
+ }
getExecutor().execute(proc);
}finally {
if (Globals.IS_SECURITY_ENABLED) {