tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net AprEndpoint.java
Date Fri, 27 May 2005 08:26:38 GMT
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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message