Eliminato condizione restart su errori send/alive (se non ok server sarebbe deleterio)

This commit is contained in:
Samuele Locatelli
2021-11-05 16:36:14 +01:00
parent 90e4a1827a
commit 2ff6b0b9da
2 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -39,7 +39,7 @@
<!--gestione coda-->
<add key="maxQueueFLog" value="16384" />
<!--gestione max num errori-->
<add key="maxAliveErrors" value="50" />
<add key="maxAliveErrors" value="1000" />
<add key="maxSendErrors" value="30" />
<add key="maxReadErrors" value="15" />
<!--parametri SIM-->
+8 -6
View File
@@ -22,7 +22,6 @@ namespace IOB_WIN_NEXT
{
public class IobGeneric
{
#region Protected Fields
/// <summary>
@@ -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
}
/// <summary>
@@ -5226,7 +5230,6 @@ namespace IOB_WIN_NEXT
/// </summary>
public class iobRefreshedEventArgs : EventArgs
{
#region Private Fields
/// <summary>
@@ -5260,6 +5263,5 @@ namespace IOB_WIN_NEXT
}
#endregion Public Properties
}
}