remm        2005/04/19 09:46:12

  Modified:    util/java/org/apache/tomcat/util/net AprEndpoint.java
  Log:
  - Add a few FIXME about polling.
  - Copy over the poller initialization code for sendfile.
  
  Revision  Changes    Path
  1.11      +18 -3     
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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AprEndpoint.java  19 Apr 2005 16:36:19 -0000      1.10
  +++ AprEndpoint.java  19 Apr 2005 16:46:12 -0000      1.11
  @@ -742,7 +742,9 @@
               } catch (Error e) {
                   if (Status.APR_STATUS_IS_EINVAL(e.getError())) {
                       try {
  -                        /* Use WIN32 maximum poll size */
  +                        // Use WIN32 maximum poll size
  +                        // FIXME: Add WARN level logging about this, as 
scalability will
  +                        // be limited
                           pollerSize = 62;
                           serverPollset = Poll.create(pollerSize, pool, 0, 
soTimeout * 1000);
                       } catch (Error err) {
  @@ -1018,8 +1020,21 @@
               try {
                   sendfilePollset = Poll.create(sendfileSize, pool, 0, 
soTimeout * 1000);
               } catch (Error e) {
  -                // FIXME: more appropriate logging
  -                e.printStackTrace();
  +                if (Status.APR_STATUS_IS_EINVAL(e.getError())) {
  +                    try {
  +                        // Use WIN32 maximum poll size
  +                        // FIXME: Add WARN level logging about this, as 
scalability will
  +                        // be limited
  +                        sendfileSize = 62;
  +                        sendfilePollset = Poll.create(sendfileSize, pool, 0, 
soTimeout * 1000);
  +                    } catch (Error err) {
  +                        // FIXME: more appropriate logging
  +                        err.printStackTrace();
  +                    }
  +                } else {
  +                    // FIXME: more appropriate logging
  +                    e.printStackTrace();
  +                }
               }
               desc = new long[sendfileSize * 4];
               sendfileData = new HashMap(sendfileSize);
  
  
  

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

Reply via email to