Fix try/catch in caso di conf server con IP su net impossibile (ping --> exc)
This commit is contained in:
+10
-3
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user