From a5724cb4cedf74cb7486d81cfeb6169f0c46f649 Mon Sep 17 00:00:00 2001 From: jfclere Date: Tue, 29 Sep 2009 12:20:57 +0000 Subject: [PATCH] timeout can't be negative... 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index e17f5cd0f..37f115855 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -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 +} -- 2.11.0