remm        2005/05/27 01:26:38

  Modified:    util/java/org/apache/tomcat/util/net AprEndpoint.java
  Log:
  - If not using sendfile, don't allocate sebdfile resources.
  
  Revision  Changes    Path
  1.36      +11 -7     
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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- AprEndpoint.java  26 May 2005 18:34:50 -0000      1.35
  +++ AprEndpoint.java  27 May 2005 08:26:38 -0000      1.36
  @@ -445,12 +445,14 @@
               pollerThread.start();
   
               // Start sendfile thread
  -            sendfile = new Sendfile();
  -            sendfile.init();
  -            sendfileThread = new Thread(sendfile, getName() + "-Sendfile");
  -            sendfileThread.setPriority(getThreadPriority());
  -            sendfileThread.setDaemon(true);
  -            sendfileThread.start();
  +            if (useSendfile) {
  +                sendfile = new Sendfile();
  +                sendfile.init();
  +                sendfileThread = new Thread(sendfile, getName() + 
"-Sendfile");
  +                sendfileThread.setPriority(getThreadPriority());
  +                sendfileThread.setDaemon(true);
  +                sendfileThread.start();
  +            }
           }
       }
   
  @@ -485,7 +487,9 @@
               running = false;
               unlockAccept();
               poller.destroy();
  -            sendfile.destroy();
  +            if (useSendfile) {
  +                sendfile.destroy();
  +            }
               acceptorThread = null;
               pollerThread = null;
               sendfileThread = null;
  
  
  

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

Reply via email to