From ad92ac98b3d89da2bf565c3d64f656f3bf2a75bc Mon Sep 17 00:00:00 2001 From: Juan Eugenio Abadie Date: Mon, 25 Mar 2019 12:28:58 -0300 Subject: [PATCH 1/2] Workaround data-race on websocketpp's _htonll function --- Release/src/websockets/client/ws_client_wspp.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Release/src/websockets/client/ws_client_wspp.cpp b/Release/src/websockets/client/ws_client_wspp.cpp index 810df4d403..6573b3a346 100644 --- a/Release/src/websockets/client/ws_client_wspp.cpp +++ b/Release/src/websockets/client/ws_client_wspp.cpp @@ -62,6 +62,9 @@ #pragma warning(disable : 4503) #endif +// workaround data-race on websocketpp's _htonll function +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 From d7ebcda757b54e19884ede716ce61f18ce4839b3 Mon Sep 17 00:00:00 2001 From: "Billy O'Neal (VC LIBS)" Date: Mon, 25 Mar 2019 20:09:22 -0700 Subject: [PATCH 2/2] Add URI to discussion. --- Release/src/websockets/client/ws_client_wspp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Release/src/websockets/client/ws_client_wspp.cpp b/Release/src/websockets/client/ws_client_wspp.cpp index 6573b3a346..a46efb305c 100644 --- a/Release/src/websockets/client/ws_client_wspp.cpp +++ b/Release/src/websockets/client/ws_client_wspp.cpp @@ -62,7 +62,8 @@ #pragma warning(disable : 4503) #endif -// workaround data-race on websocketpp's _htonll function +// 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