diff --git a/ChangeLog b/ChangeLog index 7a02d48..14cfcbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,17 @@ ChangeLog --------- +2011-01-08 17:22 Juan José Gutiérrez de Quevedo + +* fixed small bug when submitting stats that would stop the thread that +submits them + + 2011-01-08 02:27 Juan José Gutiérrez de Quevedo * revamped logging system. hopefully, messages will be more informative now + 2011-01-06 23:53 Juan José Gutiérrez de Quevedo * development restarted diff --git a/src/Database.cpp b/src/Database.cpp index 6af1444..dc10935 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -429,6 +429,7 @@ unsigned long Database::cleanDB() } catch(Exception &e) { + LERR(e); doQuery("ROLLBACK TRANSACTION"); } diff --git a/src/hermes.cpp b/src/hermes.cpp index 6bb2253..c1d6cf3 100644 --- a/src/hermes.cpp +++ b/src/hermes.cpp @@ -278,7 +278,14 @@ void *cleaner_thread_run(void *) { unsigned long spamcount; - spamcount=db.cleanDB(); + try + { + spamcount=db.cleanDB(); + } + catch(Exception &e) + { + LERR("Error cleaning the database: " + string(e)); + } LDEB("Cleaning database, cleaning "+Utils::inttostr(spamcount)+" blocked spams."); if(spamcount>0&&cfg.getSubmitStats()) {