Swoole\Database\MySQLi::checkConnection PHP Method

checkConnection() protected method

检查数据库连接,是否有效,无效则重新建立
protected checkConnection ( )
    protected function checkConnection()
    {
        if (!@$this->ping()) {
            $this->close();
            return $this->connect();
        }
        return true;
    }