You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/03/11 21:39:43 UTC
svn commit: r1666004 -
/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: markt
Date: Wed Mar 11 20:39:43 2015
New Revision: 1666004
URL: http://svn.apache.org/r1666004
Log:
Increase the size of the descriptor array to handle the worst case (believed only to occur on BSD and OSX but there is a chance it may occur on other platforms).
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1666004&r1=1666003&r2=1666004&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Mar 11 20:39:43 2015
@@ -1380,7 +1380,16 @@ public class AprEndpoint extends Abstrac
pollerSpace[i] = actualPollerSize;
}
- desc = new long[actualPollerSize * 2];
+ /*
+ * x2 - One descriptor for the socket, one for the event(s).
+ * x2 - Some APR implementations return multiple events for the
+ * same socket as different entries. Each socket is registered
+ * for a maximum of two events (read and write) at any one
+ * time.
+ *
+ * Therefore size is actual poller size *4.
+ */
+ desc = new long[actualPollerSize * 4];
connectionCount.set(0);
addList = new SocketList(defaultPollerSize);
closeList = new SocketList(defaultPollerSize);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org