diff --git a/IOB-WIN/IobGeneric.cs b/IOB-WIN/IobGeneric.cs
index 84a0834f..2f2c9181 100644
--- a/IOB-WIN/IobGeneric.cs
+++ b/IOB-WIN/IobGeneric.cs
@@ -16,6 +16,11 @@ namespace IOB_WIN
{
#region variabili ed oggetti base
+ ///
+ /// TImeout x ping al server
+ ///
+ protected int pingServerMsTimeout = utils.CRI("pingMsTimeout");
+
///
/// Indicazione VETO invio a server sino alla data-ora indicata
///
@@ -1746,19 +1751,21 @@ namespace IOB_WIN
/// test ping all'indirizzo impostato nei parametri
///
///
- private IPStatus testPingServer()
+ private IPStatus testPingServer
{
- IPStatus answ = IPStatus.Unknown; ;
- IPAddress address;
- PingReply reply;
- Ping pingSender = new Ping();
- address = IPAddress.Loopback;
- string ipAdrr = cIobConf.serverData.MPIP.Replace("http://", "").Replace("https://", "");
- IPAddress.TryParse(ipAdrr, out address);
- int pingMsTimeout = utils.CRI("pingMsTimeout");
- reply = pingSender.Send(address, pingMsTimeout);
- answ = reply.Status;
- return answ;
+ get
+ {
+ IPStatus answ = IPStatus.Unknown; ;
+ IPAddress address;
+ PingReply reply;
+ Ping pingSender = new Ping();
+ address = IPAddress.Loopback;
+ string ipAdrr = cIobConf.serverData.MPIP.Replace("http://", "").Replace("https://", "");
+ IPAddress.TryParse(ipAdrr, out address);
+ reply = pingSender.Send(address, pingServerMsTimeout);
+ answ = reply.Status;
+ return answ;
+ }
}
///
/// Verifica se il server sia ALIVE (tramite PING)
@@ -1777,14 +1784,15 @@ namespace IOB_WIN
}
else
{
- IPStatus pingStatus = testPingServer();
+ IPStatus pingStatus = testPingServer;
// se passa il ping faccio il resto...
if (pingStatus == IPStatus.Success)
{
try
{
// chiamo URL, se restituisce "OK" รจ alive!
- answ = (callUrl(urlAlive) == "OK");
+ string callResp = callUrl(urlAlive);
+ answ = (callResp == "OK");
}
catch (Exception exc)
{