diff --git a/src/ConnectionPool.php b/src/ConnectionPool.php index 6182cf5..4eca026 100644 --- a/src/ConnectionPool.php +++ b/src/ConnectionPool.php @@ -261,9 +261,9 @@ protected function startBalanceTimer(float $interval) protected function createConnection() { - $this->connectionCount++; $connection = $this->connector->connect($this->connectionConfig); $this->lastActiveTime[$connection] = time(); + $this->connectionCount++; return $connection; }