1.1 --- a/Server/Actions/ActionHarmonyCommand.cs Thu Aug 25 13:34:05 2016 +0200
1.2 +++ b/Server/Actions/ActionHarmonyCommand.cs Mon Aug 29 17:36:02 2016 +0200
1.3 @@ -74,13 +74,14 @@
1.4 //TODO: check if the harmony client connection is opened
1.5 if (Program.HarmonyClient!=null)
1.6 {
1.7 - Program.HarmonyClient.SendCommandAsync(DeviceId, FunctionName);
1.8 + // Wait synchronously for now until we figure out how we could do async stuff in EAR.
1.9 + // TODO: Have an abort option in EAR. For instance we don't want to keep sending Harmony command if one failed.
1.10 + Program.HarmonyClient.TrySendCommandAsync(DeviceId, FunctionName).Wait(10*1000);
1.11 }
1.12 else
1.13 {
1.14 Trace.WriteLine("WARNING: No Harmony client connection.");
1.15 - }
1.16 -
1.17 + }
1.18 }
1.19
1.20