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 19:58:08 UTC
[16/50] [abbrv] httpcomponents-core git commit: HTTPCORE-455: fatal
Error in an individual worker thread does not cause proper I/O reactor
shutdown
HTTPCORE-455: fatal Error in an individual worker thread does not cause proper I/O reactor shutdown
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk@1792525 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/61a85181
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/61a85181
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/61a85181
Branch: refs/heads/trunk
Commit: 61a85181b1e043b36180545d7ea3f2eac3e25422
Parents: c081515
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Mon Apr 24 18:10:38 2017 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Mon Apr 24 18:10:38 2017 +0000
----------------------------------------------------------------------
.../hc/core5/reactor/AbstractMultiworkerIOReactor.java | 13 ++++++++-----
.../apache/hc/core5/reactor/IOReactorException.java | 2 +-
2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/61a85181/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractMultiworkerIOReactor.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractMultiworkerIOReactor.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractMultiworkerIOReactor.java
index 9fec934..ebb9c77 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractMultiworkerIOReactor.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractMultiworkerIOReactor.java
@@ -297,7 +297,7 @@ public abstract class AbstractMultiworkerIOReactor implements IOReactor {
// Verify I/O dispatchers
for (int i = 0; i < this.workerCount; i++) {
final Worker worker = this.workers[i];
- final Exception ex = worker.getException();
+ final Throwable ex = worker.getThrowable();
if (ex != null) {
throw new IOReactorException("I/O dispatch worker terminated abnormally", ex);
}
@@ -491,7 +491,7 @@ public abstract class AbstractMultiworkerIOReactor implements IOReactor {
final IOReactorImpl dispatcher;
- private volatile Exception exception;
+ private volatile Throwable throwable;
public Worker(final IOReactorImpl dispatcher) {
super();
@@ -502,13 +502,16 @@ public abstract class AbstractMultiworkerIOReactor implements IOReactor {
public void run() {
try {
this.dispatcher.execute();
+ } catch (final Error ex) {
+ this.throwable = ex;
+ throw ex;
} catch (final Exception ex) {
- this.exception = ex;
+ this.throwable = ex;
}
}
- public Exception getException() {
- return this.exception;
+ public Throwable getThrowable() {
+ return this.throwable;
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/61a85181/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorException.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorException.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorException.java
index c13c163..27096a5 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorException.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorException.java
@@ -39,7 +39,7 @@ public class IOReactorException extends IOException {
private static final long serialVersionUID = -4248110651729635749L;
- public IOReactorException(final String message, final Exception cause) {
+ public IOReactorException(final String message, final Throwable cause) {
super(message);
if (cause != null) {
initCause(cause);