aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-06-08 19:29:20 +0200
committerYang Tse <yangsita@gmail.com>2010-06-08 19:29:20 +0200
commitfeecf63a9607cce4c9339ad9f1b5a550e6bd2d98 (patch)
treebb590b7fb85079bb7dcbff43d4da7283ee7d03ef
parentcbdd1cbcdee97b39a5940b61ba96ee32800f524f (diff)
avoid redundant work when reusing same connection
-rw-r--r--lib/connect.c4
1 files changed, 4 insertions, 0 deletions
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;