Author: remm Date: Tue Mar 21 07:49:50 2006 New Revision: 387554 URL: http://svn.apache.org/viewcvs?rev=387554&view=rev Log: - Apparently some OSes can also use EINTR as a semi normal result. - Harmonize sendfile poller handling.
Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=387554&r1=387553&r2=387554&view=diff ============================================================================== --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Mar 21 07:49:50 2006 @@ -1076,9 +1076,9 @@ getWorkerThread().assign(desc[n*2+1]); } } else if (rv < 0) { - /* Any non timeup error is critical */ - if (-rv != Status.TIMEUP) { - int errn = -rv; + int errn = -rv; + /* Any non timeup or interrupted error is critical */ + if ((errn != Status.TIMEUP) && (errn != Status.EINTR)) { if (errn > Status.APR_OS_START_USERERR) { errn -= Status.APR_OS_START_USERERR; } @@ -1088,6 +1088,7 @@ destroy(); init(); } + continue; } } if (soTimeout > 0 && maintainTime > 1000000L) { @@ -1470,16 +1471,19 @@ } } } else if (rv < 0) { - /* Any non timeup error is critical */ - if (-rv == Status.TIMEUP) - rv = 0; - else { - log.error(sm.getString("endpoint.poll.fail", "" + (-rv), Error.strerror(-rv))); + int errn = -rv; + /* Any non timeup or interrupted error is critical */ + if ((errn != Status.TIMEUP) && (errn != Status.EINTR)) { + if (errn > Status.APR_OS_START_USERERR) { + errn -= Status.APR_OS_START_USERERR; + } + log.error(sm.getString("endpoint.poll.fail", "" + errn, Error.strerror(errn))); // Handle poll critical failure synchronized (this) { destroy(); init(); } + continue; } } /* TODO: See if we need to call the maintain for sendfile poller */ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]