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 SocketProtocol.java
Date Sat, 01 May 2004 23:16:37 GMT
adc         2004/05/01 16:16:37

  Modified:    modules/network/src/java/org/apache/geronimo/network/protocol
                        SocketProtocol.java
  Log:
  Put in work-around for NPE from NIO impl.
  
  Revision  Changes    Path
  1.12      +3 -7      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/SocketProtocol.java
  
  Index: SocketProtocol.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/SocketProtocol.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SocketProtocol.java	1 May 2004 17:23:55 -0000	1.11
  +++ SocketProtocol.java	1 May 2004 23:16:37 -0000	1.12
  @@ -284,7 +284,6 @@
                   }
               }
           } catch (CancelledKeyException e) {
  -            log.trace("Key Cancelled:", e);
               // who knows, by the time we get here,
               // the key could have been canceled.
           }
  @@ -403,11 +402,9 @@
               if (tracing) log.trace("No more data available to be read.");
   
           } catch (CancelledKeyException e) {
  -            log.trace("Key Cancelled: ", e);
               // who knows, by the time we get here,
               // the key could have been canceled.
           } catch (ClosedChannelException e) {
  -            log.trace("Channel Closed: ", e);
               // who knows, by the time we get here,
               // the channel could have been closed.
           } catch (IOException e) {
  @@ -426,11 +423,10 @@
   
       public void close() {
           synchronized (this) {
  -            if (socketChannel != null) {
  +            if (state == STARTED) {
                   log.trace("Closing");
                   try {
  -                    selectionKey.cancel();
  -                    socketChannel.close();
  +                    selectorManager.closeChannel(socketChannel);
                   } catch (Throwable e) {
                       log.info("Closing error: ", e);
                   }
  
  
  

Mime
View raw message