web: add BoincDb::reset_connection(): clears connection variable

If your connection to the BOINC DB times out,
call reset_connection(), which clears the static member,
then call get() again.
This commit is contained in:
David Anderson 2014-11-10 21:54:27 -08:00
parent b81c686a59
commit c2e5a210a4
1 changed files with 6 additions and 0 deletions

View File

@ -106,6 +106,12 @@ class BoincDb extends DbConn {
$db = self::get();
return $db->base_error();
}
// if your DB connection times out, call this, then call get() again
//
static function reset_connection() {
self::$instance = null;
}
}
class BoincUser {