remm        02/04/23 09:25:04

  Modified:    jk/java/org/apache/jk/common ChannelSocket.java
  Log:
  - Improve (?) shutdown.
  - Make the running flag protected.
  - Update the flag state in init and destroy.
  - Don't display exceptions when shutting down.
  
  Revision  Changes    Path
  1.10      +6 -2      
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java
  
  Index: ChannelSocket.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ChannelSocket.java        18 Apr 2002 19:12:36 -0000      1.9
  +++ ChannelSocket.java        23 Apr 2002 16:25:04 -0000      1.10
  @@ -235,6 +235,8 @@
                   next=wEnv.getHandler( "request" );
           }
   
  +        running = true;
  +
           // Run a thread that will accept connections.
           tp.start();
           SocketAcceptor acceptAjp=new SocketAcceptor(  this );
  @@ -251,6 +253,7 @@
       }
   
       public void destroy() throws IOException {
  +        running = false;
           try {
               tp.shutdown();
   
  @@ -384,7 +387,7 @@
           return pos;
       }
       
  -    boolean running=true;
  +    protected boolean running=true;
       
       /** Accept incoming connections, dispatch to the thread pool
        */
  @@ -401,7 +404,8 @@
                       new SocketConnection(this, ep);
                   tp.runIt( ajpConn );
               } catch( Exception ex ) {
  -                ex.printStackTrace();
  +                if (running)
  +                    ex.printStackTrace();
               }
           }
       }
  
  
  

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

Reply via email to