Skip to content

Commit

Permalink
fix(Utilities): add 3s Timeout for GetLatestVersion()
Browse files Browse the repository at this point in the history
  • Loading branch information
MingboPeng committed Sep 5, 2023
1 parent e3ef4b9 commit 2692d52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/PollinationSDK/Helper/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public static Version GetLatestVersion(string product)
var apiUrl = $"https://utilities.pollination.cloud/latest-version/{product}";

var request = new RestSharp.RestRequest(RestSharp.Method.GET);
request.Timeout = 3000;
var client = new RestSharp.RestClient(apiUrl);
var response = client.Execute(request);
var version = response.Content?.Replace("\"", ""); //"1.2.9"
Expand Down

0 comments on commit 2692d52

Please sign in to comment.