diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-05-23 08:51:02 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-05-23 08:51:02 +0200 |
commit | 3ef3e5caa65458e595e2303358322626c7da1dda (patch) | |
tree | 6a60d401da8b5f906a423601ac4c135d44e896d1 /MatrixRoomUtils.Core/RemoteHomeServer.cs | |
parent | Local changes (diff) | |
download | MatrixUtils-3ef3e5caa65458e595e2303358322626c7da1dda.tar.xz |
Add numerous new things
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; |