timeout can't be negative...
authorjfclere <jfclere@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 29 Sep 2009 12:20:57 +0000 (12:20 +0000)
committerjfclere <jfclere@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 29 Sep 2009 12:20:57 +0000 (12:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@819899 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/SocketProperties.java

index e17f5cd..37f1158 100644 (file)
@@ -203,7 +203,7 @@ public class SocketProperties {
         if (soLingerOn != null && soLingerTime != null)
             socket.setSoLinger(soLingerOn.booleanValue(),
                     soLingerTime.intValue());
-        if (soTimeout != null)
+        if (soTimeout != null && soTimeout.intValue() >= 0)
             socket.setSoTimeout(soTimeout.intValue());
         if (tcpNoDelay != null)
             socket.setTcpNoDelay(tcpNoDelay.booleanValue());
@@ -222,7 +222,7 @@ public class SocketProperties {
                     performanceBandwidth.intValue());
         if (soReuseAddress != null)
             socket.setReuseAddress(soReuseAddress.booleanValue());
-        if (soTimeout != null)
+        if (soTimeout != null && soTimeout.intValue() >= 0)
             socket.setSoTimeout(soTimeout.intValue());
     }
 
@@ -422,4 +422,4 @@ public class SocketProperties {
     
     
 
-}
\ No newline at end of file
+}