From e4fa9a23fad356d0ec293d4b0df3e2d93b57e10a Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Tue, 2 Feb 2021 01:13:34 +0100 Subject: [PATCH] use ipv4 always, until backend supports ipv6 --- src/Network/Http.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Network/Http.cpp b/src/Network/Http.cpp index f7b8f2a..ff82c70 100644 --- a/src/Network/Http.cpp +++ b/src/Network/Http.cpp @@ -88,15 +88,15 @@ std::string PostHTTP(const std::string& host, const std::string& target, const s } return true; }; - bool ok = try_connect_with_protocol(tcp::v6()); + //bool ok = try_connect_with_protocol(tcp::v6()); + //if (!ok) { + //debug("IPv6 connect failed, trying IPv4"); + bool ok = try_connect_with_protocol(tcp::v4()); if (!ok) { - debug("IPv6 connect failed, trying IPv4"); - ok = try_connect_with_protocol(tcp::v4()); - if (!ok) { - error("failed to resolve or connect in POST " + host + target); - return "-1"; - } + error("failed to resolve or connect in POST " + host + target); + return "-1"; } + //} stream.handshake(ssl::stream_base::client); http::request req { http::verb::post, target, 11 /* http 1.1 */ };