We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fe0e975 + 08d0e12 commit f3c9aa9Copy full SHA for f3c9aa9
src/Database/PDO.php
@@ -3,6 +3,7 @@
3
namespace Utopia\Database;
4
5
use Swoole\Database\DetectsLostConnections;
6
+use Utopia\CLI\Console;
7
8
/**
9
* A PDO wrapper that forwards method calls to the internal PDO instance.
@@ -46,6 +47,7 @@ public function __call(string $method, array $args): mixed
46
47
} catch (\Throwable $e) {
48
/** @phpstan-ignore-next-line can't find static method */
49
if (DetectsLostConnections::causedByLostConnection($e)) {
50
+ Console::warning('[Database] Lost connection detected. Reconnecting...');
51
$this->reconnect();
52
return $this->pdo->{$method}(...$args);
53
}
0 commit comments