From cf63eacc1a34924a01e7d8586fccb7d7561d2250 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Wed, 28 Oct 2020 23:06:26 -0600 Subject: web_service: follow-up fix to #4842 ... * The web_service http request is now fixed on Windows (R) platform. * The issue is due to a complicated race-condition in `httplib`, a detailed explanation is available at https://github.com/yhirose/cpp-httplib/pull/701 * A pending Pull Request on `httplib` has been applied to remedy the said race-condition. * The socket availability check is removed due to a behavioral chice of `httplib` that a socket will not be created before any actual request is sent. --- src/web_service/web_backend.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index f264b98a0..67183e64c 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp @@ -71,11 +71,6 @@ struct Client::Impl { return {}; } - if (!cli->is_socket_open()) { - LOG_ERROR(WebService, "Failed to open socket, skipping request!"); - return {}; - } - cli->set_connection_timeout(TIMEOUT_SECONDS); cli->set_read_timeout(TIMEOUT_SECONDS); cli->set_write_timeout(TIMEOUT_SECONDS); -- cgit v1.2.3