Don't block on the initial connection to the dispatcher

This commit is contained in:
2019-02-22 15:16:53 -06:00
parent 4ecdacedab
commit d967afc178

View File

@ -12,7 +12,7 @@ namespace ScreenLogicConnect
{
using (var client = new TcpClient())
{
client.Connect(ServerDispatcherURL, ServerDispatcherPort);
await client.ConnectAsync(ServerDispatcherURL, ServerDispatcherPort);
var ns = client.GetStream();
ns.SendHLMessage(Messages.GetGatewayData.QUERY(systemName));
return new EasyTouchUnit(new Messages.GetGatewayData(await UnitConnection.GetMessage(ns)));