Skip to content

Commit e8abe96

Browse files
author
Stephane Landelle
committed
Merge pull request AsyncHttpClient#420 from taer/1.7.x
Reuse the socket on a 401
2 parents ddab1c7 + d394db5 commit e8abe96

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,6 +2103,9 @@ public Object call() throws Exception {
21032103
}
21042104
};
21052105

2106+
if (future.getKeepAlive()) {
2107+
future.setReuseChannel(true);
2108+
}
21062109
if (future.getKeepAlive() && response.isChunked()) {
21072110
// We must make sure there is no bytes left before executing the next request.
21082111
ctx.setAttachment(ac);

0 commit comments

Comments
 (0)