Skip to content

Commit

Permalink
Merge pull request #1324 from pkuehnel/feat/BleServiceTimout
Browse files Browse the repository at this point in the history
feat(TeslaBleService): set timout
  • Loading branch information
pkuehnel authored Jun 16, 2024
2 parents 3d8a9e8 + 167f056 commit 5db4deb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TeslaSolarCharger/Server/Services/TeslaBleService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ private async Task<DtoBleResult> SendCommandToBle(DtoBleRequest request)
using var client = new HttpClient();
try
{
//Default timeout of Tesla Command CLI is 21 seconds.
client.Timeout = TimeSpan.FromSeconds(22);
var response = await client.PostAsJsonAsync(url, request.Parameters).ConfigureAwait(false);
var responseContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
if (!response.IsSuccessStatusCode)
Expand Down

0 comments on commit 5db4deb

Please sign in to comment.