Merge branch 'release/FixPingCheck_02'
This commit is contained in:
@@ -65,7 +65,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
{
|
||||
readSemafori(ref currDispData);
|
||||
}
|
||||
catch(Exception exc)
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError($"Eccezione in processDisconnectedTask{Environment.NewLine}{exc}");
|
||||
}
|
||||
@@ -144,7 +144,9 @@ namespace IOB_WIN_FORM.Iob
|
||||
}
|
||||
sw.Stop();
|
||||
// fermo per una quota del tempo di attesa previsto
|
||||
Task.Delay(vetoCheckSec - (int)sw.ElapsedMilliseconds + 20);
|
||||
int nextWait = vetoCheckSec * 1000 - (int)sw.ElapsedMilliseconds + 20;
|
||||
nextWait = nextWait < 0 ? 10 : nextWait;
|
||||
Task.Delay(nextWait);
|
||||
}
|
||||
|
||||
public override void startAdapter(bool resetQueue)
|
||||
@@ -168,8 +170,6 @@ namespace IOB_WIN_FORM.Iob
|
||||
lgDebug($"PING: tryConnect step 01 | connectionOk: {connectionOk}");
|
||||
if (!connectionOk)
|
||||
{
|
||||
//// resetto coda...
|
||||
//QueuePing = new DataQueue("000", "QueuePing", false);
|
||||
// controllo che il ping sia stato tentato almeno pingTestSec fa...
|
||||
if (DateTime.Now.Subtract(lastPING).TotalSeconds > utils.CRI("pingTestSec"))
|
||||
{
|
||||
@@ -201,6 +201,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
{
|
||||
// loggo no risposta ping ...
|
||||
lgError("PING KO");
|
||||
// 2026.05.19 aggiunta esecuzione disconnect
|
||||
queueInEnabCurr = true;
|
||||
processDisconnectedTask();
|
||||
queueInEnabCurr = false;
|
||||
@@ -240,7 +241,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
// controllo: se era spenta e risulta ping ok --> reset coda!
|
||||
if (B_input == 0 && pingOk)
|
||||
{
|
||||
B_input = 1;
|
||||
B_input = bInOn;
|
||||
QueuePing = new DataQueue(IOBConfFull.General.FilenameIOB, "QueuePing", false, redisMan);
|
||||
lgTrace($"QueuePing resetted on addTest");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user