From c4ed7802029ba55fc7b4bd2a8fb79fdceaeb9582 Mon Sep 17 00:00:00 2001 From: sgourdas Date: Sun, 6 Oct 2024 13:17:24 +0300 Subject: [PATCH] fixup! Get ipv4 working on dual stack --- src/server/internalServer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/internalServer.cpp b/src/server/internalServer.cpp index fb5808e3e..3a262661a 100644 --- a/src/server/internalServer.cpp +++ b/src/server/internalServer.cpp @@ -529,6 +529,12 @@ bool InternalServer::start() { closesocket(sock); return false; } + + if (::bind(sock, (struct sockaddår*)&sockAddr6, sizeof(sockAddr6)) == SOCKET_ERROR) { + std::cerr << "ERROR: Failed to bind IPv6 socket" << std::endl; + closesocket(sock); + return false; + } } #endif mp_daemon = MHD_start_daemon(flags,