Pārlūkot izejas kodu

魔盒更新会断开远程维护连接及注销后更新。

felix 1 gadu atpakaļ
vecāks
revīzija
55e00dec05

+ 4 - 0
FISSDK/FISSDK/FISProxy.cs

@@ -667,6 +667,10 @@ namespace FISLib
 
         private void OnReadyToUpgrade(object sender, string e)
         {
+            if (_fisAfterSales != null)
+            {
+                _fisAfterSales.ForceDisconnect();
+            }
             ReadyToUpgrade?.Invoke(this, e);
         }
     }

+ 14 - 3
Vinno.FIS.Sonopost/Features/AfterSales/PushPatchAfterSalesTask.cs

@@ -84,9 +84,20 @@ namespace Vinno.FIS.Sonopost.Features.AfterSales
                     SetPushPatchProcess(0.85);
                     SetPushPatchProcess(0.95);
                     SetPushPatchProcess(1);
-                    ForceDisconnect();
-                    AppManager.Instance.GetManager<IOledManager>().ShowStatus(OledMessage.Upgrading);
-                    UpgradeHelper.StartUpgrade(_patchFile, true);
+                    try
+                    {
+                        ForceDisconnect();
+                        AppManager.Instance.GetManager<ILoginManager>().Logoff();
+                    }
+                    catch (Exception ex)
+                    {
+                        Logger.WriteLineError($"AfterSalesManager PatchTask LogOff Error:{ex}");
+                    }
+                    finally
+                    {
+                        AppManager.Instance.GetManager<IOledManager>().ShowStatus(OledMessage.Upgrading);
+                        UpgradeHelper.StartUpgrade(_patchFile, true);
+                    }
                 }
                 else
                 {

+ 0 - 3
Vinno.vCloud.Common.FIS/AfterSales/AfterSalesV2.cs

@@ -1363,9 +1363,6 @@ namespace Vinno.vCloud.Common.FIS.AfterSales
                                 DownloadPatchSuccess();
                                 if (_currentPushPatchDeviceType == "FISSDK" && !string.IsNullOrEmpty(processResult.FileToken))
                                 {
-                                    ForceDisconnect();
-                                    _master = null;
-                                    OnMasterChanged(null);
                                     if (Directory.Exists(processResult.FileToken))
                                     {
                                         DirectoryHelper.DeleteDirectory(_fisPackagePath);

BIN
packages/WingInterfaceLibrary.dll