From cd6c8f9bc8664631809fa054ad31191be1a98963 Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 5 Mar 2012 16:49:01 +0000 Subject: [PATCH] fix flush race in rrdcached -- Christian Hitz git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2282 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_daemon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index 340ea15..2c81424 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -295,7 +295,9 @@ static int handle_request_help (HANDLER_PROTO); static void sig_common (const char *sig) /* {{{ */ { RRDD_LOG(LOG_NOTICE, "caught SIG%s", sig); - state = FLUSHING; + if (state == RUNNING) { + state = FLUSHING; + } pthread_cond_broadcast(&flush_cond); pthread_cond_broadcast(&queue_cond); } /* }}} void sig_common */ -- 2.30.2