From 2bd7b466234fffcd33e1e74f19cf4342ab183fd4 Mon Sep 17 00:00:00 2001 From: ps Date: Thu, 3 Feb 2011 10:37:42 +0000 Subject: [PATCH] fix stats submission --- src/hermes.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hermes.cpp b/src/hermes.cpp index 1102a67..233f788 100644 --- a/src/hermes.cpp +++ b/src/hermes.cpp @@ -288,6 +288,11 @@ void *cleaner_thread_run(void *) { unsigned long spamcount; + next_run=now+3600; //if we just add 3600 like before, then if + //time changes during execution of hermes this will run + //every few seconds instead of every hour + + try { spamcount=db.cleanDB(); @@ -328,7 +333,6 @@ void *cleaner_thread_run(void *) LDEB("Exception sending stats: "+string(e)); } } - next_run+=3600; } #ifndef WIN32 if(false==cfg.getBackground())