diff --git a/src/Client.php b/src/Client.php index 96ae162..2b8085c 100644 --- a/src/Client.php +++ b/src/Client.php @@ -342,13 +342,12 @@ public function connect() $this->_queue = \array_merge([[['AUTH', $this->_auth], time(), null]], $this->_queue); } - $this->_firstConnect = false; - $this->_connection->onError = function ($code, $msg) { echo new \Exception("Workerman Redis Connection Error $code $msg"); }; $this->process(); $this->_firstConnect && $this->_connectionCallback && \call_user_func($this->_connectionCallback, true, $this); + $this->_firstConnect = false; }; $time_start = microtime(true);