mirror of https://github.com/BOINC/boinc.git
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:
parent
b81c686a59
commit
c2e5a210a4
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue