From a77d31850f62d7136cef8976ada57f4893704394 Mon Sep 17 00:00:00 2001 From: fhanik Date: Tue, 9 Jun 2009 22:28:00 +0000 Subject: [PATCH] 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 --- java/org/apache/tomcat/util/net/NioEndpoint.java | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.11.0