Author: remy.maucherat(a)jboss.com
Date: 2007-10-02 22:19:19 -0400 (Tue, 02 Oct 2007)
New Revision: 291
Modified:
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Log:
- Comments cleanup.
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2007-10-02 18:18:53 UTC (rev
290)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2007-10-03 02:19:19 UTC (rev
291)
@@ -780,10 +780,8 @@
// connection quicker
s.setSoLinger(true, 0);
}
- } catch(Exception e) {
- if (log.isDebugEnabled()) {
- log.debug(sm.getString("endpoint.debug.unlock", "" +
port), e);
- }
+ } catch (Exception e) {
+ // Ignore
} finally {
if (s != null) {
try {
@@ -1286,7 +1284,9 @@
timeout = soTimeout;
}
- // FIXME: timeout is useless, look into removing it
+ // 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
+ // be worth bothering though.
long pollset = allocatePoller(actualPollerSize, pool, timeout);
if (pollset == 0 && actualPollerSize > 1024) {
actualPollerSize = 1024;
@@ -1520,6 +1520,7 @@
keepAliveCount++;
}
} else {
+ // This is either a resume or a suspend.
if (comet) {
if (info.resume) {
// Resume event
@@ -1531,8 +1532,8 @@
timeouts.add(info.socket,
System.currentTimeMillis() + info.timeout);
}
} else {
- // Should never happen
- // FIXME: ISE ?
+ // Should never happen, if not Comet, the socket is
always put in
+ // the list with the read flag.
Socket.destroy(info.socket);
}
}
@@ -1556,6 +1557,7 @@
// Check for failed sockets and hand this socket off to a
worker
if (((desc[n*2] & Poll.APR_POLLHUP) ==
Poll.APR_POLLHUP)
|| ((desc[n*2] & Poll.APR_POLLERR) ==
Poll.APR_POLLERR)
+ // Comet processes either a read or a write
depending on what the poller returns
|| (comet &&
(((desc[n*2] & Poll.APR_POLLIN) ==
Poll.APR_POLLIN) && !processSocket(desc[n*2+1], SocketStatus.OPEN_READ))
|| (((desc[n*2] & Poll.APR_POLLOUT)
== Poll.APR_POLLOUT) && !processSocket(desc[n*2+1], SocketStatus.OPEN_WRITE)))
@@ -2071,7 +2073,7 @@
continue;
}
}
- /* TODO: See if we need to call the maintain for sendfile poller */
+ // FIXME: See if we need to call the maintain for the sendfile
poller
} catch (Throwable t) {
log.error(sm.getString("endpoint.poll.error"), t);
}
Show replies by date