Fix NC reconnection
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user