Lines Matching refs:connection
55 * @var Connection $connection
57 $connection = $this->selector->select($this->connections);
58 if ($connection->isAlive() === true) {
59 return $connection;
62 if ($this->readyToRevive($connection) === true) {
63 if ($connection->ping() === true) {
64 return $connection;
67 $skipped[] = $connection;
72 foreach ($skipped as $connection) {
73 if ($connection->ping() === true) {
74 return $connection;
83 foreach ($this->connections as $connection) {
84 $connection->markDead();
88 private function readyToRevive(Connection $connection): bool
91 $this->pingTimeout * pow(2, $connection->getPingFailures()),
95 if ($connection->getLastPing() + $timeout < time()) {