]> granicus.if.org Git - curl/commitdiff
reuse_conn: don't copy flags that are known to be equal
authorMichael Kaufmann <mail@michael-kaufmann.ch>
Sun, 24 Sep 2017 13:02:12 +0000 (15:02 +0200)
committerMichael Kaufmann <mail@michael-kaufmann.ch>
Thu, 28 Sep 2017 19:18:02 +0000 (21:18 +0200)
A connection can only be reused if the flags "conn_to_host" and
"conn_to_port" match. Therefore it is not necessary to copy these flags
in reuse_conn().

Closes #1918

lib/url.c

index e3b41528d9365e78da1596aefae58d0b1f00c375..9ad503dbd9b4a173f1eb05c1dc0d1a0fbd73fa2d 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -6333,9 +6333,7 @@ static void reuse_conn(struct connectdata *old_conn,
   Curl_safefree(conn->host.rawalloc);
   Curl_safefree(conn->conn_to_host.rawalloc);
   conn->host = old_conn->host;
-  conn->bits.conn_to_host = old_conn->bits.conn_to_host;
   conn->conn_to_host = old_conn->conn_to_host;
-  conn->bits.conn_to_port = old_conn->bits.conn_to_port;
   conn->conn_to_port = old_conn->conn_to_port;
   conn->remote_port = old_conn->remote_port;