]> granicus.if.org Git - curl/commitdiff
conncontrol: only log changes to the connection bit
authorDaniel Stenberg <daniel@haxx.se>
Sat, 7 Mar 2015 18:14:35 +0000 (19:14 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 7 Mar 2015 18:18:49 +0000 (19:18 +0100)
lib/connect.c

index 19b961934a83a67ce625dd9375165f174277132a..464d7fbac223846ccf428952c47a74d0f0b9aeea 100644 (file)
@@ -1359,11 +1359,12 @@ void Curl_conncontrol(struct connectdata *conn, bool closeit,
 #if defined(CURL_DISABLE_VERBOSE_STRINGS)
   (void) reason;
 #endif
+  if(closeit != conn->bits.close) {
+    infof(conn->data, "Marked for [%s]: %s\n", closeit?"closure":"keep alive",
+          reason);
 
-  infof(conn->data, "Marked for [%s]: %s\n", closeit?"closure":"keep alive",
-        reason);
-
-  conn->bits.close = closeit; /* the only place in the source code that should
-                                 assign this bit */
+    conn->bits.close = closeit; /* the only place in the source code that
+                                   should assign this bit */
+  }
 }
 #endif