remm        2005/06/10 05:55:12

  Modified:    util/java/org/apache/tomcat/util/net AprEndpoint.java
  Log:
  - Start with the end of the socket list.
  
  Revision  Changes    Path
  1.40      +2 -2      
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java
  
  Index: AprEndpoint.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- AprEndpoint.java  10 Jun 2005 12:49:56 -0000      1.39
  +++ AprEndpoint.java  10 Jun 2005 12:55:12 -0000      1.40
  @@ -856,7 +856,7 @@
                       // Add sockets which are waiting to the poller
                       if (addCount > 0) {
                           synchronized (addS) {
  -                            for (int i = 0; i < addCount; i++) {
  +                            for (int i = (addCount - 1); i >= 0; i--) {
                                   int rv = Poll.add
                                       (serverPollset, addS[i], addP[i], 
Poll.APR_POLLIN);
                                   if (rv == Status.APR_SUCCESS) {
  @@ -1217,7 +1217,7 @@
                       // Add socket to the poller
                       if (addS.size() > 0) {
                           synchronized (addS) {
  -                            for (int i = 0; i < addS.size(); i++) {
  +                            for (int i = addS.size() - 1; i >= 0; i--) {
                                   SendfileData data = (SendfileData) 
addS.get(i);
                                   int rv = Poll.add(sendfilePollset, 
data.socket, 0, Poll.APR_POLLOUT);
                                   if (rv == Status.APR_SUCCESS) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to