From 1dadb26ffcf59c02cfbe5e5521d9aa17b998683f Mon Sep 17 00:00:00 2001 From: Malte Linke Date: Mon, 6 May 2024 14:54:54 +0200 Subject: [PATCH] Fix #3 (#6) --- UtilityClient/Utility.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UtilityClient/Utility.cs b/UtilityClient/Utility.cs index a91bdf8..4dd9ba1 100644 --- a/UtilityClient/Utility.cs +++ b/UtilityClient/Utility.cs @@ -103,7 +103,7 @@ void TempMessageHandler(object? _, MessageData message) // find socket address string host = status["Status"]?["config"]?["http_settings"]?["bind_address"]?.GetValue() ?? ""; Int32 port = status["Status"]?["config"]?["http_settings"]?["port"]?.GetValue() ?? 0; - await this.ConnectAsync($"ws://{host}:{port}/api/websocket"); + await this.ConnectAsync($"ws://{(host == "0.0.0.0" ? "127.0.0.1" : host)}:{port}/api/websocket"); } public new async Task ConnectAsync(string uri)