1
0
Fork 0
mirror of synced 2024-09-28 23:41:23 +12:00

Change reconnect logic

This commit is contained in:
Eldad Fux 2020-07-03 14:35:10 +03:00
parent ed39069cc2
commit fe0dc25921
2 changed files with 2 additions and 2 deletions

View file

@ -61,6 +61,8 @@ class PDO extends PDONative
public function reconnect()
{
sleep(3);
$this->pdo = new PDONative($this->dsn, $this->username, $this->passwd, $this->options);
// Connection settings

View file

@ -49,8 +49,6 @@ class PDOStatement extends PDOStatementNative
try {
$result = $this->PDOStatement->execute($input_parameters);
} catch (\Throwable $th) {
// throw new Exception('My Error: ' .$th->getMessage());
sleep(1);
$this->pdo->reconnect();
$result = $this->PDOStatement->execute($input_parameters);
}