From 6ddc0c8af5ae4e11ea179e99950835a0b5d33f2f Mon Sep 17 00:00:00 2001 From: Christian Hammacher Date: Wed, 18 Sep 2024 18:57:05 +0200 Subject: [PATCH] Fixed connect string in standalone mode --- src/DuetHttpClient/Connector/PollConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DuetHttpClient/Connector/PollConnector.cs b/src/DuetHttpClient/Connector/PollConnector.cs index b438625a3..2dd2bc178 100644 --- a/src/DuetHttpClient/Connector/PollConnector.cs +++ b/src/DuetHttpClient/Connector/PollConnector.cs @@ -61,7 +61,7 @@ public static async Task ConnectAsync(Uri baseUri, DuetHttpOption uint? sessionKey = null; using (HttpClient client = new() { Timeout = options.Timeout }) { - using HttpResponseMessage response = await client.GetAsync(new Uri(baseUri, "rr_connect?password={HttpUtility.UrlPathEncode(password)}&time={DateTime.Now:s}"), cancellationToken); + using HttpResponseMessage response = await client.GetAsync(new Uri(baseUri, $"rr_connect?password={HttpUtility.UrlPathEncode(options.Password)}&time={DateTime.Now:s}"), cancellationToken); response.EnsureSuccessStatusCode(); #if NET6_0_OR_GREATER