summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-04-17 16:47:01 +0000
committerChris Wilson <chris+github@qwirx.com>2014-04-17 16:47:01 +0000
commitd41a0cb563573bf6ce22efe04549eeb1795f0f61 (patch)
treeb4aa7c853d93bc6273fe8aa1ca55cf99b456f4fa
parent058160d2df3fd4801b1562fce5d29d9f3da95c1c (diff)
Fix BackgroundTask timer being destroyed after timer system cleaned up.
Caused an assertion failure and crash.
-rw-r--r--bin/bbackupd/BackupDaemon.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp
index 3dbae4d6..7f883e21 100644
--- a/bin/bbackupd/BackupDaemon.cpp
+++ b/bin/bbackupd/BackupDaemon.cpp
@@ -477,25 +477,23 @@ void BackupDaemon::Run()
}
catch(...)
{
- if(mapCommandSocketInfo.get())
+ try
{
- try
- {
- mapCommandSocketInfo.reset();
- }
- catch(std::exception &e)
- {
- BOX_WARNING("Internal error while "
- "closing command socket after "
- "another exception: " << e.what());
- }
- catch(...)
- {
- BOX_WARNING("Error closing command socket "
- "after exception, ignored.");
- }
+ mapCommandSocketInfo.reset();
+ }
+ catch(std::exception &e)
+ {
+ BOX_WARNING("Internal error while closing command "
+ "socket after another exception, ignored: " <<
+ e.what());
+ }
+ catch(...)
+ {
+ BOX_WARNING("Error closing command socket after "
+ "exception, ignored.");
}
+ mapCommandSocketPollTimer.reset();
Timers::Cleanup();
throw;
@@ -503,6 +501,7 @@ void BackupDaemon::Run()
// Clean up
mapCommandSocketInfo.reset();
+ mapCommandSocketPollTimer.reset();
Timers::Cleanup();
}