diff --git a/src/Appwrite/Extend/PDO.php b/src/Appwrite/Extend/PDO.php index 786064a0f6..4eefe6bec0 100644 --- a/src/Appwrite/Extend/PDO.php +++ b/src/Appwrite/Extend/PDO.php @@ -4,7 +4,7 @@ namespace Appwrite\Extend; use PDO as PDONative; -class PDO +class PDO extends PDONative { /** * @var PDONative diff --git a/src/Appwrite/Extend/PDOStatement.php b/src/Appwrite/Extend/PDOStatement.php index 670b84bf00..a0046cece9 100644 --- a/src/Appwrite/Extend/PDOStatement.php +++ b/src/Appwrite/Extend/PDOStatement.php @@ -5,7 +5,7 @@ namespace Appwrite\Extend; use PDO as PDONative; use PDOStatement as PDOStatementNative; -class PDOStatement +class PDOStatement extends PDOStatementNative { /** * @var PDO @@ -50,6 +50,7 @@ class PDOStatement $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); }