geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject cvs commit: incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol ProtocolFactory.java
Date Sun, 01 Aug 2004 03:52:21 GMT
adc         2004/07/31 20:52:21

  Modified:    modules/network/src/java/org/apache/geronimo/network/protocol
                        ProtocolFactory.java
  Log:
  Sometimes the connection has been closed but not reclaimed.
  
  Revision  Changes    Path
  1.8       +9 -2      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/ProtocolFactory.java
  
  Index: ProtocolFactory.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/ProtocolFactory.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProtocolFactory.java	8 Jul 2004 05:13:29 -0000	1.7
  +++ ProtocolFactory.java	1 Aug 2004 03:52:20 -0000	1.8
  @@ -129,13 +129,20 @@
       }
   
       public void drain() throws Exception {
  +
           synchronized (connectionCache) {
               Iterator keys = connectionCache.keySet().iterator();
               while (keys.hasNext()) {
                   ConnectionCacheMonitor ccm = (ConnectionCacheMonitor) connectionCache.get(keys.next());
   
                   ClockDaemon.cancel(ccm.clockTicket);
  -                ccm.connection.drain();
  +                if (!ccm.connection.isDone()) {
  +                    try {
  +                        ccm.connection.drain();
  +                    } catch(ProtocolException pe) {
  +                        // DO NOTHING: protocol may have already stopped
  +                    }
  +                }
   
                   log.trace("Connection [" + ccm.key + "] reclaimed");
               }
  
  
  

Mime
View raw message