Fix try/catch in caso di conf server con IP su net impossibile (ping --> exc)

This commit is contained in:
Samuele E. Locatelli
2019-01-19 10:17:07 +01:00
parent 81984d6ea8
commit 72b431630d
+10 -3
View File
@@ -339,8 +339,15 @@ namespace IOB_WIN
address = IPAddress.Loopback;
string ipAdrr = MPIP;
IPAddress.TryParse(ipAdrr, out address);
reply = pingSender.Send(address, 100);
answ = reply.Status;
try
{
reply = pingSender.Send(address, 100);
answ = reply.Status;
}
catch (Exception exc)
{
lgError(string.Format("testPingServer() EXCEPTION in fase di ping{0}{1}{2}", Environment.NewLine, exc));
}
return answ;
}
/// <summary>
@@ -727,7 +734,7 @@ namespace IOB_WIN
MainProgrBar.Invalidate();
}
}
catch(Exception exc)
catch (Exception exc)
{ }
}
/// <summary>