aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index bb09d2fd3..17b34c68e 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -4238,6 +4238,12 @@ static CURLcode create_conn(struct SessionHandle *data,
infof(data, "Re-using existing connection! (#%ld) with host %s\n",
conn->connectindex,
conn->proxy.name?conn->proxy.dispname:conn->host.dispname);
+ /* copy this IP address to the common buffer for the easy handle so that
+ the address can actually survice the removal of this connection. strcpy
+ is safe since the target buffer is big enough to hold the largest
+ possible IP address */
+ strcpy(data->info.ip, conn->ip_addr_str);
+
}
else {
/*