From 42a6e760f727d8d86f0effd158b3cedc13bf2f17 Mon Sep 17 00:00:00 2001 From: Juan Eugenio Abadie Date: Tue, 26 Mar 2019 00:09:37 -0300 Subject: [PATCH] Workaround data-race on websocketpp's _htonll function (#1082) * Workaround data-race on websocketpp's _htonll function * Add URI to discussion. --- Release/src/websockets/client/ws_client_wspp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Release/src/websockets/client/ws_client_wspp.cpp b/Release/src/websockets/client/ws_client_wspp.cpp index 810df4d403..a46efb305c 100644 --- a/Release/src/websockets/client/ws_client_wspp.cpp +++ b/Release/src/websockets/client/ws_client_wspp.cpp @@ -62,6 +62,10 @@ #pragma warning(disable : 4503) #endif +// Workaround data-race on websocketpp's _htonll function, see +// https://github.com/Microsoft/cpprestsdk/pull/1082 +auto avoidDataRaceOnHtonll = websocketpp::lib::net::_htonll(0); + // This is a hack to avoid memory leak reports from the debug MSVC CRT for all // programs using the library: ASIO calls SSL_library_init() which calls // SSL_COMP_get_compression_methods(), which allocates some heap memory and the