From: fhanik Date: Tue, 9 Jun 2009 22:28:00 +0000 (+0000) Subject: Put a short timeout on the unlock accept X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a77d31850f62d7136cef8976ada57f4893704394;p=tomcat7.0 Put a short timeout on the unlock accept git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@783160 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index 4339d2f41..8a5981d19 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -1034,8 +1034,10 @@ public class NioEndpoint { // Need to create a connection to unlock the accept(); if (address == null) { s = new java.net.Socket("127.0.0.1", port); + s.setSoTimeout(2000); } else { s = new java.net.Socket(address, port); + s.setSoTimeout(2000); // setting soLinger to a small value will help shutdown the // connection quicker s.setSoLinger(true, 0);