keep mysql connection alive

This commit is contained in:
aina-esokia
2018-07-26 10:30:12 +04:00
parent db840292fe
commit 7465b0d56b

View File

@@ -139,6 +139,11 @@ abstract class base implements cache_cacheableInterface
*/
public function get_connection()
{
if($this->connection->ping() === false){
$this->connection->close();
$this->connection->connect();
}
return $this->connection;
}