Skip to content

Commit

Permalink
No need to wait for the async requests, prevents locking up the UI in…
Browse files Browse the repository at this point in the history
… case a bad IP is configured
  • Loading branch information
astutejoe committed Mar 21, 2024
1 parent 0e86213 commit 6662b06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AutoKeyLight/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private void CameraIsOn()
StringContent httpContent = new StringContent("{\"lights\": [{\"on\": 1}]}", Encoding.UTF8, "application/json");
try
{
httpClient.PutAsync(keylightURL, httpContent).Wait();
httpClient.PutAsync(keylightURL, httpContent);
}
catch { }
}
Expand All @@ -234,7 +234,7 @@ private void CameraIsOff()

try
{
httpClient.PutAsync(keylightURL, httpContent).Wait();
httpClient.PutAsync(keylightURL, httpContent);
}
catch { }
}
Expand Down

0 comments on commit 6662b06

Please sign in to comment.