diff --git a/DelugeRPCClient.Net/Core/CoreDelugeWebClient.cs b/DelugeRPCClient.Net/Core/CoreDelugeWebClient.cs index 13ac59b..8d96f06 100644 --- a/DelugeRPCClient.Net/Core/CoreDelugeWebClient.cs +++ b/DelugeRPCClient.Net/Core/CoreDelugeWebClient.cs @@ -61,7 +61,9 @@ private async Task PostJson(String json) StringContent content = new StringContent(json); content.Headers.ContentType = new MediaTypeWithQualityHeaderValue("application/json"); - var responseMessage = await HttpClient.PostAsync(Url, content); + var httpClient = new HttpClient(); + httpClient.Timeout = TimeSpan.FromMilliseconds(30); + var responseMessage = await httpClient.PostAsync(Url, content); responseMessage.EnsureSuccessStatusCode(); var responseJson = await responseMessage.Content.ReadAsStringAsync();