diff options
Diffstat (limited to 'MatrixRoomUtils.Core/RemoteHomeServer.cs')
-rw-r--r-- | MatrixRoomUtils.Core/RemoteHomeServer.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MatrixRoomUtils.Core/RemoteHomeServer.cs b/MatrixRoomUtils.Core/RemoteHomeServer.cs index 9c096c8..942f873 100644 --- a/MatrixRoomUtils.Core/RemoteHomeServer.cs +++ b/MatrixRoomUtils.Core/RemoteHomeServer.cs @@ -1,7 +1,6 @@ using System.Net.Http.Json; using System.Text.Json; using MatrixRoomUtils.Core.Interfaces; -using MatrixRoomUtils.Core.Responses; namespace MatrixRoomUtils.Core; @@ -13,12 +12,14 @@ public class RemoteHomeServer : IHomeServer { HomeServerDomain = canonicalHomeServerDomain; _httpClient = new HttpClient(); + _httpClient.Timeout = TimeSpan.FromSeconds(5); } public async Task<RemoteHomeServer> Configure() { FullHomeServerDomain = await ResolveHomeserverFromWellKnown(HomeServerDomain); _httpClient.Dispose(); _httpClient = new HttpClient { BaseAddress = new Uri(FullHomeServerDomain) }; + _httpClient.Timeout = TimeSpan.FromSeconds(5); Console.WriteLine("[RHS] Finished setting up http client"); return this; |