Author: remy.maucherat(a)jboss.com
Date: 2009-04-02 12:17:25 -0400 (Thu, 02 Apr 2009)
New Revision: 979
Modified:
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
trunk/webapps/docs/changelog.xml
Log:
- Fix timeout handling after the code changes for values <= 0.
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2009-04-02 01:12:31 UTC (rev
978)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2009-04-02 16:17:25 UTC (rev
979)
@@ -1396,10 +1396,6 @@
// Adjust poller size so that it won't reach the limit
actualPollerSize = 1024;
}
- int timeout = keepAliveTimeout;
- if (timeout < 0) {
- timeout = soTimeout;
- }
// At the moment, setting the timeout is useless, but it could get used
// again as the normal poller could be faster using maintain. It might not
@@ -1486,6 +1482,10 @@
if (timeout < 0) {
timeout = soTimeout;
}
+ if (timeout <= 0) {
+ // Always put a timeout in
+ timeout = Integer.MAX_VALUE;
+ }
boolean ok = false;
synchronized (this) {
// Add socket to the list. Newly added sockets will wait
@@ -1522,6 +1522,10 @@
if (timeout < 0) {
timeout = soTimeout;
}
+ if (timeout <= 0) {
+ // Always put a timeout in
+ timeout = Integer.MAX_VALUE;
+ }
boolean ok = false;
synchronized (this) {
// Add socket to the list. Newly added sockets will wait
Modified: trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 2009-04-02 01:12:31 UTC (rev
978)
+++ trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 2009-04-02 16:17:25 UTC (rev
979)
@@ -691,6 +691,10 @@
if (timeout < 0) {
timeout = soTimeout;
}
+ if (timeout <= 0) {
+ // Always put a timeout in
+ timeout = Integer.MAX_VALUE;
+ }
boolean ok = false;
synchronized (this) {
// Add socket to the list. Newly added sockets will wait
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2009-04-02 01:12:31 UTC (rev 978)
+++ trunk/webapps/docs/changelog.xml 2009-04-02 16:17:25 UTC (rev 979)
@@ -57,6 +57,9 @@
<update>
Add support for non IO events in all connectors. (remm)
</update>
+ <fix>
+ Fix handling of timeout values <= 0 with the poller refactoring. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
Show replies by date