diff --git a/include/dba.php b/include/dba.php index b21b01b6db..c0617af8e8 100644 --- a/include/dba.php +++ b/include/dba.php @@ -598,6 +598,13 @@ class dba { logger('DB Error '.self::$errorno.': '.self::$error."\n". System::callstack(8)."\n".self::replaceParameters($sql, $params)); + // On a lost connection we simply quit. + // A reconnect like in self::p could be dangerous with modifications + if ($errorno == 2006) { + logger('Giving up because of database error '.$errorno.': '.$error); + exit(1); + } + self::$error = $error; self::$errorno = $errorno; }