Skip to content

Reuse the socket on a 401 #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2013
Merged

Conversation

taer
Copy link
Contributor

@taer taer commented Nov 11, 2013

On a 401, the client was opening a new socket, regardless of the keeplive status. The client was sending keepAlive and the remote server was honoring it.

This patch sets reuseChannel if the keepalive was honored by the remote server.

If client requests keepalive and server allows it, reuse the socket
@@ -2103,6 +2103,9 @@ public Object call() throws Exception {
}
};

if (future.getKeepAlive()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate if since we don't want to base resuse of socket on the chunked response.

slandelle pushed a commit that referenced this pull request Nov 11, 2013
Reuse the socket on a 401
@slandelle slandelle merged commit e8abe96 into AsyncHttpClient:ahc-1.7.x Nov 11, 2013
slandelle pushed a commit that referenced this pull request Jan 24, 2014
slandelle pushed a commit that referenced this pull request Jan 30, 2014
@taer taer deleted the 1.7.x branch September 2, 2014 14:11
cs-workco pushed a commit to cs-workco/async-http-client that referenced this pull request Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants