hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject httpcomponents-core git commit: Don't need to nest in an else clause.
Date Thu, 17 Aug 2017 21:38:34 GMT
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 <garydgregory@gmail.com>
Authored: Thu Aug 17 15:38:32 2017 -0600
Committer: Gary Gregory <garydgregory@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) {


Mime
View raw message