diff --git a/src/AbstractPool.php b/src/AbstractPool.php index 4a4058b..043a7da 100644 --- a/src/AbstractPool.php +++ b/src/AbstractPool.php @@ -197,8 +197,13 @@ abstract class AbstractPool implements Pool $connection->close(); } $this->idle = new \SplQueue; - $this->connections = new \SplObjectStorage; $this->prepare = null; + + if ($this->deferred instanceof Deferred) { + $deferred = $this->deferred; + $this->deferred = null; + $deferred->fail(new FailureException("Connection pool closed")); + } } /**