[master] 94f4464 Don't start the ban-lurker until -spersistent is done loading.

Poul-Henning Kamp phk at varnish-cache.org
Tue Nov 8 14:44:42 CET 2011


commit 94f4464792d5b57041bd8e9b8d089f2bd8bd9bb7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Nov 8 13:44:29 2011 +0000

    Don't start the ban-lurker until -spersistent is done loading.

diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c
index 8dc7cb4..c01a3f6 100644
--- a/bin/varnishd/cache_ban.c
+++ b/bin/varnishd/cache_ban.c
@@ -102,6 +102,7 @@ static struct lock ban_mtx;
 static struct ban *ban_magic;
 static pthread_t ban_thread;
 static struct ban * volatile ban_start;
+static bgthread_t ban_lurker;
 
 /*--------------------------------------------------------------------
  * BAN string magic markers
@@ -583,6 +584,7 @@ BAN_Compile(void)
 
 	SMP_NewBan(ban_magic->spec, ban_len(ban_magic->spec));
 	ban_start = VTAILQ_FIRST(&ban_head);
+	WRK_BgThread(&ban_thread, "ban-lurker", ban_lurker, NULL);
 }
 
 /*--------------------------------------------------------------------
@@ -1090,5 +1092,4 @@ BAN_Init(void)
 	ban_magic->flags |= BAN_F_GONE;
 	VSC_C_main->n_ban_gone++;
 	BAN_Insert(ban_magic);
-	WRK_BgThread(&ban_thread, "ban-lurker", ban_lurker, NULL);
 }



More information about the varnish-commit mailing list