Commit 4c89ac95 authored by jehan's avatar jehan
Browse files

make sure db is reconnected on « unknown error »

parent 570f927e
......@@ -89,7 +89,8 @@ public:
} catch (const soci::soci_error &e) {
lWarning() << "Catched exception in MainDb::" << info.name << ".";
soci::soci_error::error_category category = e.get_error_category();
if (category == soci::soci_error::connection_error && info.mainDb->forceReconnect()) {
if ((category == soci::soci_error::connection_error
|| category == soci::soci_error::unknown) && info.mainDb->forceReconnect()) {
mResult = mFunction();
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment