From 2ff6b0b9da7389a43f6fc1e4e7106b077947c77f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 5 Nov 2021 16:36:14 +0100 Subject: [PATCH] Eliminato condizione restart su errori send/alive (se non ok server sarebbe deleterio) --- IOB-WIN-NEXT/App.config | 2 +- IOB-WIN-NEXT/IobGeneric.cs | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/IOB-WIN-NEXT/App.config b/IOB-WIN-NEXT/App.config index 9ea4f1e8..a5dec4bb 100644 --- a/IOB-WIN-NEXT/App.config +++ b/IOB-WIN-NEXT/App.config @@ -39,7 +39,7 @@ - + diff --git a/IOB-WIN-NEXT/IobGeneric.cs b/IOB-WIN-NEXT/IobGeneric.cs index 1ce42ee4..b8f81414 100644 --- a/IOB-WIN-NEXT/IobGeneric.cs +++ b/IOB-WIN-NEXT/IobGeneric.cs @@ -22,7 +22,6 @@ namespace IOB_WIN_NEXT { public class IobGeneric { - #region Protected Fields /// @@ -1005,6 +1004,7 @@ namespace IOB_WIN_NEXT answ = MPOnline; } +#if false // se NON alive --> registro errore x possibile reboot if (!answ) { @@ -1022,6 +1022,7 @@ namespace IOB_WIN_NEXT { currAliveErrors = 0; } +#endif return answ; } @@ -2225,13 +2226,14 @@ namespace IOB_WIN_NEXT } else { - currSendErrors++; // mostro SERVER KO x invio... ROSSO currDispData.semOut = Semaforo.SR; if (periodicLog) { lgInfo("IOB - SERVER NOT READY"); } +#if false + currSendErrors++; // se ho + di 30 errori --> riavvio if (currSendErrors > 30) { @@ -2239,13 +2241,15 @@ namespace IOB_WIN_NEXT currSendErrors = 0; tryDisconnect(); } +#endif } } catch (Exception exc) { - currSendErrors++; lgError($"Errore in fase trySendValues | currSendErrors: {currSendErrors}{Environment.NewLine}{exc}"); currDispData.semOut = Semaforo.SR; +#if false + currSendErrors++; // controllo reboot if (currSendErrors > maxSendErrors) { @@ -2253,6 +2257,7 @@ namespace IOB_WIN_NEXT currSendErrors = 0; tryDisconnect(); } +#endif } raiseRefresh(currDispData); } @@ -5218,7 +5223,6 @@ namespace IOB_WIN_NEXT } #endregion Public Methods - } /// @@ -5226,7 +5230,6 @@ namespace IOB_WIN_NEXT /// public class iobRefreshedEventArgs : EventArgs { - #region Private Fields /// @@ -5260,6 +5263,5 @@ namespace IOB_WIN_NEXT } #endregion Public Properties - } } \ No newline at end of file