Re: svn commit: r763585 - /tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

2009-04-09 Thread Remy Maucherat
On Thu, 2009-04-09 at 14:37 +0100, Mark Thomas wrote:
> This broke with
> http://svn.apache.org/viewvc?view=rev&revision=703017
> for org.apache.coyote.ajp.AjpProtocol but I suspect no-one ever tested
> it until today when I swapped AJP implementations for trunk.
> 
> I'm open to fixing it a different way if you have a better suggestion.

Ok, I was looking at the old code for setSocketOptions.

Rémy


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r763585 - /tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

2009-04-09 Thread Mark Thomas
Remy Maucherat wrote:
> On Thu, 2009-04-09 at 10:20 +, ma...@apache.org wrote:
>> Author: markt
>> Date: Thu Apr  9 10:20:36 2009
>> New Revision: 763585
>>
>> URL: http://svn.apache.org/viewvc?rev=763585&view=rev
>> Log:
>> Java uses 0 rather than -1 for infinite socket timeout
> 
> But the value is never used if <= 0, so what does it change ?

This broke with
http://svn.apache.org/viewvc?view=rev&revision=703017
for org.apache.coyote.ajp.AjpProtocol but I suspect no-one ever tested
it until today when I swapped AJP implementations for trunk.

I'm open to fixing it a different way if you have a better suggestion.

Mark



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r763585 - /tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

2009-04-09 Thread Remy Maucherat
On Thu, 2009-04-09 at 10:20 +, ma...@apache.org wrote:
> Author: markt
> Date: Thu Apr  9 10:20:36 2009
> New Revision: 763585
> 
> URL: http://svn.apache.org/viewvc?rev=763585&view=rev
> Log:
> Java uses 0 rather than -1 for infinite socket timeout

But the value is never used if <= 0, so what does it change ?

Rémy



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r763585 - /tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

2009-04-09 Thread markt
Author: markt
Date: Thu Apr  9 10:20:36 2009
New Revision: 763585

URL: http://svn.apache.org/viewvc?rev=763585&view=rev
Log:
Java uses 0 rather than -1 for infinite socket timeout

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=763585&r1=763584&r2=763585&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Thu Apr  9 
10:20:36 2009
@@ -253,7 +253,14 @@
  * Socket timeout.
  */
 public int getSoTimeout() { return socketProperties.getSoTimeout(); }
-public void setSoTimeout(int soTimeout) { 
socketProperties.setSoTimeout(soTimeout); }
+public void setSoTimeout(int soTimeout) {
+// APR/native uses -1 for infinite - Java uses 0
+if (soTimeout == -1) {
+socketProperties.setSoTimeout(0);
+} else {
+socketProperties.setSoTimeout(soTimeout);
+}
+}
 
 
 /**



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org