hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r495901 - in /jakarta/httpcomponents/httpcore/trunk: RELEASE_NOTES.txt module-nio/src/main/java/org/apache/http/nio/impl/reactor/DefaultConnectingIOReactor.java
Date Sat, 13 Jan 2007 14:27:55 GMT
Author: olegk
Date: Sat Jan 13 06:27:54 2007
New Revision: 495901

URL: http://svn.apache.org/viewvc?view=rev&rev=495901
Log:
HTTPCORE-23: Fixed threading bug in DefaultConnectingIOReactor.

Contributed by Asankha C. Perera <asankha at wso2.com>
Reviewed by Oleg Kalnichevski

Modified:
    jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/reactor/DefaultConnectingIOReactor.java

Modified: jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt?view=diff&rev=495901&r1=495900&r2=495901
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt (original)
+++ jakarta/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt Sat Jan 13 06:27:54 2007
@@ -1,3 +1,10 @@
+Changes since release 4.0 Alpha 3
+-------------------
+
+* [HTTPCORE-23] Fixed threading bug in DefaultConnectingIOReactor.
+  Contributed by Asankha C. Perera <asankha at wso2.com>
+
+
 Release 4.0 Alpha 3
 -------------------
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/reactor/DefaultConnectingIOReactor.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/reactor/DefaultConnectingIOReactor.java?view=diff&rev=495901&r1=495900&r2=495901
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/reactor/DefaultConnectingIOReactor.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/reactor/DefaultConnectingIOReactor.java
Sat Jan 13 06:27:54 2007
@@ -173,14 +173,15 @@
             socketChannel.socket().bind(localAddress);
         }
         socketChannel.connect(remoteAddress);
-        SelectionKey key = socketChannel.register(this.selector, SelectionKey.OP_CONNECT);
-        
+        SelectionKey key = socketChannel.register(this.selector, 0);
+
         SessionRequestImpl sessionRequest = new SessionRequestImpl(
                 remoteAddress, localAddress, attachment, key);
         sessionRequest.setConnectTimeout(HttpConnectionParams.getConnectionTimeout(this.params));
 
         SessionRequestHandle requestHandle = new SessionRequestHandle(sessionRequest); 
         key.attach(requestHandle);
+        key.interestOps(SelectionKey.OP_CONNECT);
         return sessionRequest;
     }
 



Mime
View raw message