From 55cc0ab0ef44394a4df667f2a8912f630ba8a533 Mon Sep 17 00:00:00 2001 From: benbierens Date: Mon, 11 Nov 2024 16:21:58 +0100 Subject: [PATCH] sets http client timeout to 1h --- Tools/AutoClient/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tools/AutoClient/Program.cs b/Tools/AutoClient/Program.cs index 788da79..b065850 100644 --- a/Tools/AutoClient/Program.cs +++ b/Tools/AutoClient/Program.cs @@ -81,13 +81,13 @@ public class Program foreach (var e in endpointStrs) { - result.Add(await CreateUser(e)); + result.Add(await CreateCodexInstance(e)); } return result.ToArray(); } - private async Task CreateUser(string endpoint) + private async Task CreateCodexInstance(string endpoint) { var splitIndex = endpoint.LastIndexOf(':'); var host = endpoint.Substring(0, splitIndex); @@ -99,6 +99,7 @@ public class Program ); var client = new HttpClient(); + client.Timeout = TimeSpan.FromMinutes(60.0); var codex = new CodexApi(client); codex.BaseUrl = $"{address.Host}:{address.Port}/api/codex/v1";