From feecf63a9607cce4c9339ad9f1b5a550e6bd2d98 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 8 Jun 2010 19:29:20 +0200 Subject: avoid redundant work when reusing same connection --- lib/connect.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/connect.c b/lib/connect.c index 3ca6aa3ce..f917ed595 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -570,6 +570,10 @@ void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd) struct SessionHandle *data = conn->data; struct PureInfo *info = &conn->data->info; + if(conn->bits.reuse) + /* reusing same connection */ + return; + len = sizeof(struct Curl_sockaddr_storage); if(getpeername(sockfd, (struct sockaddr*) &ssrem, &len)) { error = SOCKERRNO; -- cgit v1.2.3