We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 5771f413 authored by Zach Copley's avatar Zach Copley

Fil's Patch to DB_DataObject to make it reconnect to the DB if

there's no connection. This patch has been added upstream and will
be in the next release, but I need it now for the bidirectional
bridge to work.
parent bc190595
......@@ -2357,6 +2357,8 @@ class DB_DataObject extends DB_DataObject_Overload
$t= explode(' ',microtime());
$_DB_DATAOBJECT['QUERYENDTIME'] = $time = $t[0]+$t[1];
do {
if ($_DB_driver == 'DB') {
$result = $DB->query($string);
......@@ -2374,8 +2376,19 @@ class DB_DataObject extends DB_DataObject_Overload
// try to reconnect, at most 3 times
$again = false;
if (is_a($result, 'PEAR_Error')
AND $result->getCode() == DB_ERROR_NODBSELECTED
AND $cpt++<3) {
$again = true;
} while ($again);
if (is_a($result,'PEAR_Error')) {
if (!empty($_DB_DATAOBJECT['CONFIG']['debug'])) {
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