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 2019/09/18 10:56:50 UTC
[httpcomponents-core] branch bug-fixes created (now 98521e0)
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a change to branch bug-fixes
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git.
at 98521e0 Regression: fixed regression in SingleCoreIOReactor leading to unhandled CancelledKeyException and causing abnormal I/O reactor termination
This branch includes the following new commits:
new 98521e0 Regression: fixed regression in SingleCoreIOReactor leading to unhandled CancelledKeyException and causing abnormal I/O reactor termination
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[httpcomponents-core] 01/01: Regression: fixed regression in
SingleCoreIOReactor leading to unhandled CancelledKeyException and causing
abnormal I/O reactor termination
Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch bug-fixes
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit 98521e0e8cb40f70f217dce20e3f5a332203f905
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Wed Sep 18 12:53:30 2019 +0200
Regression: fixed regression in SingleCoreIOReactor leading to unhandled CancelledKeyException and causing abnormal I/O reactor termination
---
.../main/java/org/apache/hc/core5/reactor/SingleCoreIOReactor.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/SingleCoreIOReactor.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/SingleCoreIOReactor.java
index 8b92321..7d10b29 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/SingleCoreIOReactor.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/SingleCoreIOReactor.java
@@ -48,6 +48,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.hc.core5.concurrent.FutureCallback;
import org.apache.hc.core5.function.Callback;
import org.apache.hc.core5.function.Decorator;
+import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.io.Closer;
import org.apache.hc.core5.net.NamedEndpoint;
import org.apache.hc.core5.util.Args;
@@ -174,7 +175,11 @@ class SingleCoreIOReactor extends AbstractSingleCoreIOReactor implements Connect
for (final SelectionKey key : selectedKeys) {
final InternalChannel channel = (InternalChannel) key.attachment();
if (channel != null) {
- channel.handleIOEvent(key.readyOps());
+ try {
+ channel.handleIOEvent(key.readyOps());
+ } catch (final CancelledKeyException ex) {
+ close(CloseMode.GRACEFUL);
+ }
}
}
selectedKeys.clear();