Index: trunk/FACT++/src/Database.h
===================================================================
--- trunk/FACT++/src/Database.h	(revision 19434)
+++ trunk/FACT++/src/Database.h	(revision 19435)
@@ -76,7 +76,14 @@
             set_option(new mysqlpp::CompressOption());
 
+        set_option(new mysqlpp::ReconnectOption(true));
+
         // Connect to the database
         if (!server.empty())
-            connect(db.c_str(), server.c_str(), user.c_str(), passwd.c_str(), port);
+            reconnect();
+    }
+
+    void reconnect()
+    {
+        connect(db.c_str(), server.c_str(), user.c_str(), passwd.c_str(), port);
     }
 };
