Revert "add ipv6 listener prefix"

This reverts commit f14294387e.
This commit is contained in:
GHXX 2024-01-31 05:14:03 +01:00
parent f14294387e
commit a9436bfda8

View File

@ -24,13 +24,12 @@ public sealed class HttpServer {
conf = configuration; conf = configuration;
listener = new HttpListener(); listener = new HttpListener();
listener.Prefixes.Add($"http://localhost:{port}/"); listener.Prefixes.Add($"http://localhost:{port}/");
listener.Prefixes.Add($"http://[::1]:{port}/");
mainLogger = new(LogOutputTopic.Main, conf); mainLogger = new(LogOutputTopic.Main, conf);
requestLogger = new(LogOutputTopic.Request, conf); requestLogger = new(LogOutputTopic.Request, conf);
} }
public void Start() { public void Start() {
mainLogger.Information($"Starting on port {Port} (IPv4+IPv6)..."); mainLogger.Information($"Starting on port {Port}...");
Assert(listenerTask == null, "Server was already started!"); Assert(listenerTask == null, "Server was already started!");
listener.Start(); listener.Start();
listenerTask = Task.Run(GetContextLoopAsync); listenerTask = Task.Run(GetContextLoopAsync);