r3427 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Nov 24 15:41:47 CET 2008


Author: phk
Date: 2008-11-24 15:41:36 +0100 (Mon, 24 Nov 2008)
New Revision: 3427

Modified:
   trunk/varnish-cache/bin/varnishd/cache_pool.c
Log:

Only emit debug message for writes that fail


Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c	2008-11-24 14:04:42 UTC (rev 3426)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c	2008-11-24 14:41:36 UTC (rev 3427)
@@ -124,11 +124,12 @@
 	CHECK_OBJ_NOTNULL(w, WORKER_MAGIC);
 	if (*w->wfd >= 0 && w->niov > 0 && w->werr == 0) {
 		i = writev(*w->wfd, w->iov, w->niov);
-		if (i != w->liov)
+		if (i != w->liov) {
 			w->werr++;
-		WSL(w, SLT_Debug, *w->wfd,
-		    "Write error, len = %d/%d, errno = %s",
-		    i, w->liov, strerror(errno));
+			WSL(w, SLT_Debug, *w->wfd,
+			    "Write error, len = %d/%d, errno = %s",
+			    i, w->liov, strerror(errno));
+		}
 	}
 	w->liov = 0;
 	w->niov = 0;



More information about the varnish-commit mailing list