                         let reason = NSLocalizedString("数据存在新版本，推荐进行更新，请点击确定开始更新", comment: "")
                         confirmToUpdate(reason: reason, newVersion: vm.minimumSupportedDataVersion, cancelable: true)
                     
-                    // finally, do normal updating, because local minimum supported version has no patch information.
-                    } else {
-                        doUpdating(types: types)
+                    // finally, do normal updating, local minimum supported version has no patch information.
+                    } else {
+                        // if user cancelled, do nothing
+                        if let error = error as NSError?, error.code == NSURLErrorCancelled {
+            
+                        } else {
+                            doUpdating(types: types)
+                        }
                     }
                 }
             })

            }
            updater.checkUpdate(dataTypes: types, complete: { [weak self] (items, errors) in
                if !errors.isEmpty && items.count == 0 {
                    hm.hide(animated: false)
                    var errorStr = ""
                    if let error = errors.first as? CGSSUpdaterError {
                        errorStr.append(error.localizedDescription)
                    } else if let error = errors.first {
                        errorStr.append(error.localizedDescription)
                    }
                    let alert = UIAlertController.init(title: NSLocalizedString("检查更新失败", comment: "更新框")
                        , message: errorStr, preferredStyle: .alert)
                    alert.addAction(UIAlertAction.init(title: NSLocalizedString("确定", comment: "弹出框按钮"), style: .default, handler: nil))
                    self?.tabBarController?.present(alert, animated: true, completion: nil)
                } else {
                    if items.count == 0 {
                        hm.setup(NSLocalizedString("数据是最新版本", comment: "更新框"), animated: false, cancelable: false)

        }
        if updater.isWorking || gr.isProcessing { return }
        
        hm.show()
        hm.cancelAction = {
            updater.cancelCurrentSession()
        }
        hm.setup(NSLocalizedString("检查更新中", comment: "更新框"), animated: true, cancelable: true)
        
        func doUpdating(types: CGSSUpdateDataTypes) {
            DispatchQueue.main.async {
                hm.show()
