You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2017/08/17 21:38:34 UTC
httpcomponents-core git commit: Don't need to nest in an else clause.
Repository: httpcomponents-core
Updated Branches:
refs/heads/4.4.x dd21461f7 -> 8db8525f6
Don't need to nest in an else clause.
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/8db8525f
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/8db8525f
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/8db8525f
Branch: refs/heads/4.4.x
Commit: 8db8525f6e34d0927443abec215e065dcce192c8
Parents: dd21461
Author: Gary Gregory <ga...@gmail.com>
Authored: Thu Aug 17 15:38:32 2017 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Thu Aug 17 15:38:32 2017 -0600
----------------------------------------------------------------------
.../http/nio/protocol/HttpAsyncRequestExecutor.java | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/8db8525f/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java
index e05e73c..d4f84d1 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java
@@ -371,13 +371,12 @@ public class HttpAsyncRequestExecutor implements NHttpClientEventHandler {
state.setRequestState(MessageState.BODY_STREAM);
state.setTimeout(0);
return;
- } else {
- state.invalidate();
- final HttpAsyncClientExchangeHandler handler = getHandler(conn);
- if (handler != null) {
- handler.failed(new SocketTimeoutException());
- handler.close();
- }
+ }
+ state.invalidate();
+ final HttpAsyncClientExchangeHandler handler = getHandler(conn);
+ if (handler != null) {
+ handler.failed(new SocketTimeoutException());
+ handler.close();
}
}
if (conn.getStatus() == NHttpConnection.ACTIVE) {