hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject [18/34] httpcomponents-core git commit: HTTPCORE-379: shut down non-blocking server side connection in case of an i/o or runtime error to avoid an infinite loop in the i/o reactor trying to flush buffered output Contributed by Dmitry Potapov <potapov.d a
Date Tue, 09 May 2017 20:02:47 GMT
HTTPCORE-379: shut down non-blocking server side connection in case of an i/o or runtime error
to avoid an infinite loop in the i/o reactor trying to flush buffered output
Contributed by Dmitry Potapov <potapov.d at gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.3.x@1590620
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/f4efa0c1
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/f4efa0c1
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/f4efa0c1

Branch: refs/heads/4.3.x
Commit: f4efa0c1ffd0cfad540af1b21596ac3f24489a7e
Parents: 3dd3189
Author: Oleg Kalnichevski <olegk@apache.org>
Authored: Mon Apr 28 12:58:23 2014 +0000
Committer: Oleg Kalnichevski <olegk@apache.org>
Committed: Mon Apr 28 12:58:23 2014 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/http/nio/protocol/HttpAsyncService.java   | 2 +-
 .../java/org/apache/http/nio/protocol/TestHttpAsyncService.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/f4efa0c1/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
index ae965e0..bc90373 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
@@ -237,7 +237,7 @@ public class HttpAsyncService implements NHttpServerEventHandler {
                 || state.getResponseState().compareTo(MessageState.INIT) > 0) {
             // There is not much that we can do if a response
             // has already been submitted
-            closeConnection(conn);
+            shutdownConnection(conn);
         } else {
             final HttpContext context = state.getContext();
             final HttpAsyncResponseProducer responseProducer = handleException(

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/f4efa0c1/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
index d88b158..e831829 100644
--- a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
+++ b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
@@ -230,7 +230,7 @@ public class TestHttpAsyncService {
 
         Assert.assertEquals(MessageState.READY, state.getRequestState());
         Assert.assertEquals(MessageState.READY, state.getResponseState());
-        Mockito.verify(this.conn).close();
+        Mockito.verify(this.conn).shutdown();
         Mockito.verify(this.requestConsumer).failed(httpex);
         Mockito.verify(this.requestConsumer).close();
         Mockito.verify(this.responseProducer).failed(httpex);


Mime
View raw message