mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Change reconnect logic
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user