commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1129811 - in /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net: LocalSocketEndpoint.java SocketEndpoint.java
Date Tue, 31 May 2011 17:22:38 GMT
Author: mturk
Date: Tue May 31 17:22:37 2011
New Revision: 1129811

URL: http://svn.apache.org/viewvc?rev=1129811&view=rev
Log:
Do not queue already selected keys

Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/LocalSocketEndpoint.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/SocketEndpoint.java

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/LocalSocketEndpoint.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/LocalSocketEndpoint.java?rev=1129811&r1=1129810&r2=1129811&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/LocalSocketEndpoint.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/LocalSocketEndpoint.java
Tue May 31 17:22:37 2011
@@ -154,6 +154,8 @@ public class LocalSocketEndpoint extends
                 throw new IllegalSelectorException();
             if (att != null)
                 key.attach(att);
+            if (key.selected)
+                return key;
         }
         return sel.queue(key, sd);
     }

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/SocketEndpoint.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/SocketEndpoint.java?rev=1129811&r1=1129810&r2=1129811&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/SocketEndpoint.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/SocketEndpoint.java
Tue May 31 17:22:37 2011
@@ -150,6 +150,8 @@ public class SocketEndpoint extends Endp
                 throw new IllegalSelectorException();
             if (att != null)
                 key.attach(att);
+            if (key.selected)
+                return key;
         }
         return sel.queue(key, sd);
     }



Mime
View raw message