public function fetch() { while (!empty($this->pool)) { $conn = array_pop($this->pool); if ($conn->isConnected()) { swoole_timer_clear($conn->timer); $conn->timer = null; return $conn; } } return null; }