directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r188683 - in /directory/network: branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java branches/dirmina-39/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
Date Tue, 07 Jun 2005 03:51:14 GMT
Author: trustin
Date: Mon Jun  6 20:51:12 2005
New Revision: 188683

URL: http://svn.apache.org/viewcvs?rev=188683&view=rev
Log:
Fixed: DIRMINA-55


Modified:
    directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java
    directory/network/branches/dirmina-39/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java

Modified: directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java?rev=188683&r1=188682&r2=188683&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java
(original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java
Mon Jun  6 20:51:12 2005
@@ -184,10 +184,9 @@
                 return;
             }
 
-            SelectionKey key = session.getSelectionKey();
             synchronized( cancelQueue )
             {
-                cancelQueue.push( key );
+                cancelQueue.push( session );
             }
         }
 
@@ -485,16 +484,16 @@
 
         for( ;; )
         {
-            SelectionKey key;
+            DatagramSession session;
             synchronized( cancelQueue )
             {
-                key = ( SelectionKey ) cancelQueue.pop();
+                session = ( DatagramSession ) cancelQueue.pop();
             }
-
-            if( key == null )
+            if( session == null )
                 break;
             else
             {
+                SelectionKey key = session.getSelectionKey();
                 DatagramChannel ch = ( DatagramChannel ) key.channel();
                 try
                 {
@@ -504,6 +503,7 @@
                 {
                     exceptionMonitor.exceptionCaught( this, e );
                 }
+                session.notifyClose();
                 key.cancel();
                 selector.wakeup(); // wake up again to trigger thread death
             }

Modified: directory/network/branches/dirmina-39/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/dirmina-39/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java?rev=188683&r1=188682&r2=188683&view=diff
==============================================================================
--- directory/network/branches/dirmina-39/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
(original)
+++ directory/network/branches/dirmina-39/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
Mon Jun  6 20:51:12 2005
@@ -184,10 +184,9 @@
                 return;
             }
 
-            SelectionKey key = session.getSelectionKey();
             synchronized( cancelQueue )
             {
-                cancelQueue.push( key );
+                cancelQueue.push( session );
             }
         }
 
@@ -472,16 +471,17 @@
 
         for( ;; )
         {
-            SelectionKey key;
+            DatagramSession session;
             synchronized( cancelQueue )
             {
-                key = ( SelectionKey ) cancelQueue.pop();
+                session = ( DatagramSession ) cancelQueue.pop();
             }
 
-            if( key == null )
+            if( session == null )
                 break;
             else
             {
+                SelectionKey key = session.getSelectionKey();
                 DatagramChannel ch = ( DatagramChannel ) key.channel();
                 try
                 {
@@ -491,7 +491,7 @@
                 {
                     exceptionMonitor.exceptionCaught( this, e );
                 }
-                // FIXME: call closeFuture.set( Boolean.TRUE ) here
+                session.notifyClose();
                 key.cancel();
                 selector.wakeup(); // wake up again to trigger thread death
             }

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java?rev=188683&r1=188682&r2=188683&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
Mon Jun  6 20:51:12 2005
@@ -184,10 +184,9 @@
                 return;
             }
 
-            SelectionKey key = session.getSelectionKey();
             synchronized( cancelQueue )
             {
-                cancelQueue.push( key );
+                cancelQueue.push( session );
             }
         }
 
@@ -472,16 +471,17 @@
 
         for( ;; )
         {
-            SelectionKey key;
+            DatagramSession session;
             synchronized( cancelQueue )
             {
-                key = ( SelectionKey ) cancelQueue.pop();
+                session = ( DatagramSession ) cancelQueue.pop();
             }
 
-            if( key == null )
+            if( session == null )
                 break;
             else
             {
+                SelectionKey key = session.getSelectionKey();
                 DatagramChannel ch = ( DatagramChannel ) key.channel();
                 try
                 {
@@ -491,6 +491,7 @@
                 {
                     exceptionMonitor.exceptionCaught( this, e );
                 }
+                session.notifyClose();
                 key.cancel();
                 selector.wakeup(); // wake up again to trigger thread death
             }



Mime
View raw message