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 2018/10/09 11:29:01 UTC

[2/2] httpcomponents-core git commit: Performance optimization: I/O sessions to trigger output event as early as there is interest in output

Performance optimization: I/O sessions to trigger output event as early as there is interest in output


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/56e861a6
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/56e861a6
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/56e861a6

Branch: refs/heads/master
Commit: 56e861a663428261b66ea4d4a892f5140382d25e
Parents: 4dd83de
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Tue Oct 9 13:26:53 2018 +0200
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Tue Oct 9 13:26:53 2018 +0200

----------------------------------------------------------------------
 .../java/org/apache/hc/core5/reactor/InternalDataChannel.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/56e861a6/httpcore5/src/main/java/org/apache/hc/core5/reactor/InternalDataChannel.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/InternalDataChannel.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/InternalDataChannel.java
index d654003..1e8f5b7 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/InternalDataChannel.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/InternalDataChannel.java
@@ -128,7 +128,8 @@ final class InternalDataChannel extends InternalChannel implements ProtocolIOSes
                     }
                 } while (tlsSession.getReadCount() > 0);
             }
-            if ((readyOps & SelectionKey.OP_WRITE) != 0) {
+            if ((readyOps & SelectionKey.OP_WRITE) != 0
+                    || (ioSession.getEventMask() & SelectionKey.OP_WRITE) != 0) {
                 ioSession.updateWriteTime();
                 if (tlsSession.isAppOutputReady()) {
                     if (sessionListener != null) {