hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1590620 - in /httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src: main/java/org/apache/http/nio/protocol/HttpAsyncService.java test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
Date Mon, 28 Apr 2014 12:58:24 GMT
Author: olegk
Date: Mon Apr 28 12:58:23 2014
New Revision: 1590620

URL: http://svn.apache.org/r1590620
Log:
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>

Modified:
    httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
    httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java

Modified: httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java?rev=1590620&r1=1590619&r2=1590620&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
(original)
+++ httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
Mon Apr 28 12:58:23 2014
@@ -237,7 +237,7 @@ public class HttpAsyncService implements
                 || 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(

Modified: httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java?rev=1590620&r1=1590619&r2=1590620&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
(original)
+++ httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
Mon Apr 28 12:58:23 2014
@@ -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