Fix NC reconnection

This commit is contained in:
Lucio Maranta
2018-01-30 09:32:58 +01:00
parent 3e0718e133
commit 1886104516
+9 -1
View File
@@ -46,6 +46,8 @@ public static class ThreadsFunctions
// Send through signalR
MessageServices.Current.Publish(SEND_ALARMS, null, alarms);
}
else
TryNcConnection();
sw.Stop();
//Send to the UI the time
@@ -86,6 +88,9 @@ public static class ThreadsFunctions
// Send through signalR
MessageServices.Current.Publish(SEND_GENERIC_DATA, null, genericData);
}
else
TryNcConnection();
sw.Stop();
//Send to the UI the time
@@ -126,6 +131,8 @@ public static class ThreadsFunctions
// Send through signalR
MessageServices.Current.Publish(SEND_AXES, null, genericData);
}
else
TryNcConnection();
sw.Stop();
//Send to the UI the time
@@ -166,6 +173,8 @@ public static class ThreadsFunctions
// Send through signalR
MessageServices.Current.Publish(SEND_POWER_ON_DATA, null, powerOnData);
}
else
TryNcConnection();
sw.Stop();
//Send time to the UI
@@ -229,7 +238,6 @@ public static class ThreadsFunctions
}
}
public static void AbortNcConnection()
{
if (ConnThread != null && ConnThread.IsAlive)