You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/05/09 20:03:53 UTC
[24/35] httpcomponents-core git commit: HTTPCORE-282: The default
value of the internal event mask of newly created non-blocking I/O is not
correctly initialized,
which causes the READ interest bit to get cleared in the interest op queuing
mode unless th
HTTPCORE-282: The default value of the internal event mask of newly created non-blocking I/O is not correctly initialized, which causes the READ interest bit to get cleared in the interest op queuing mode unless the event mask is explicitly reset
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.1.x@1204950 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/a32882c5
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/a32882c5
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/a32882c5
Branch: refs/heads/4.1.x
Commit: a32882c5f09512045f0909b8803d8866cde9d978
Parents: 85263c2
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Tue Nov 22 12:20:36 2011 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Tue Nov 22 12:20:36 2011 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 8 ++++----
.../java/org/apache/http/impl/nio/NHttpConnectionBase.java | 1 -
.../java/org/apache/http/impl/nio/reactor/IOSessionImpl.java | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/a32882c5/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index e7d7526..38bad2b 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,10 +1,10 @@
Changes since 4.1.3
-------------------
-* [HTTPCORE-282] Newly created non-blocking I/O sessions to have READ interest op bit cleared
- per default due to a regression introduced in release 4.1.1. This has a side effect on client
- side non-blocking connections when running in the interest op queuing mode.
- Contributed by Sadeep Jayasumana <sadeep at wso2.com>
+* [HTTPCORE-282] The default value of the internal event mask of newly created non-blocking I/O
+ is not correctly initialized, which causes the READ interest bit to get cleared in the interest
+ op queuing mode unless the event mask is explicitly reset.
+ Contributed by Sadeep Jayasumana <sadeep at wso2.com> and Oleg Kalnichevski <olegk at apache.org>
* [HTTPCORE-268] Handle runtime exceptions thrown by SSLEngine.
Contributed by Oleg Kalnichevski <olegk at apache.org>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/a32882c5/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java b/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
index 980b883..4e2b192 100644
--- a/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
+++ b/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
@@ -156,7 +156,6 @@ public class NHttpConnectionBase
this.session = session;
this.context = new SessionHttpContext(this.session);
this.session.setBufferStatus(this);
- this.session.setEvent(EventMask.READ);
this.remote = this.session.getRemoteAddress();
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/a32882c5/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java b/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
index 2c3f802..277db9a 100644
--- a/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
+++ b/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
@@ -87,7 +87,7 @@ public class IOSessionImpl implements IOSession {
this.interestOpsCallback = interestOpsCallback;
this.sessionClosedCallback = sessionClosedCallback;
this.attributes = Collections.synchronizedMap(new HashMap<String, Object>());
- this.currentEventMask = 0;
+ this.currentEventMask = key.interestOps();
this.socketTimeout = 0;
this.status = ACTIVE;
long now = System.currentTimeMillis();