Swoole\Database\MySQLi::tryReconnect PHP Method

tryReconnect() protected method

protected tryReconnect ( $call, $params )
    protected function tryReconnect($call, $params)
    {
        $result = false;
        for ($i = 0; $i < 2; $i++) {
            $result = @call_user_func_array($call, $params);
            if ($result === false) {
                if ($this->errno == 2013 or $this->errno == 2006) {
                    $r = $this->checkConnection();
                    if ($r === true) {
                        continue;
                    }
                } else {
                    Swoole\Error::info(__CLASS__ . " SQL Error", $this->errorMessage($params[0]));
                    return false;
                }
            }
            break;
        }
        return $result;
    }