diff --git a/System/Pool/Connection.php b/System/Pool/Connection.php index 88b791b3..89ae4a76 100644 --- a/System/Pool/Connection.php +++ b/System/Pool/Connection.php @@ -210,7 +210,7 @@ class Connection extends Pool $this->newClient($config, $coroutineName); } [$time, $connections] = $this->get($coroutineName); - if ($connections instanceof PDO) { + if (!($connections instanceof PDO)) { throw new Exception('Database exception.'); } return Context::setContext($coroutineName, $connections);