mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
keep mysql connection alive
This commit is contained in:
@@ -139,6 +139,11 @@ abstract class base implements cache_cacheableInterface
|
|||||||
*/
|
*/
|
||||||
public function get_connection()
|
public function get_connection()
|
||||||
{
|
{
|
||||||
|
if($this->connection->ping() === false){
|
||||||
|
$this->connection->close();
|
||||||
|
$this->connection->connect();
|
||||||
|
}
|
||||||
|
|
||||||
return $this->connection;
|
return $this->connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user