Skip to content

Commit

Permalink
fixed connection with local instance
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarresi committed Feb 28, 2021
1 parent e0357ab commit d96b0c9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion TwinCatAdsTool.Logic/Services/ClientService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ public Task Connect(string amsNetId, int port)
CurrentAmsNetId = amsNetId;
if (!Client.IsConnected)
{
Client.Connect(amsNetId, port);
if (string.IsNullOrEmpty(CurrentAmsNetId))
{
Client.Connect(port);
}
else
{
Client.Connect(amsNetId, port);
}
}

ConnectionStarted = true;
Expand Down

0 comments on commit d96b0c9

Please sign in to comment.