Skip to content

Commit 42a6e76

Browse files
whoanBillyONeal
authored andcommitted
Workaround data-race on websocketpp's _htonll function (#1082)
* Workaround data-race on websocketpp's _htonll function * Add URI to discussion.
1 parent 9b670e5 commit 42a6e76

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Release/src/websockets/client/ws_client_wspp.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
#pragma warning(disable : 4503)
6363
#endif
6464

65+
// Workaround data-race on websocketpp's _htonll function, see
66+
// https://github.com/Microsoft/cpprestsdk/pull/1082
67+
auto avoidDataRaceOnHtonll = websocketpp::lib::net::_htonll(0);
68+
6569
// This is a hack to avoid memory leak reports from the debug MSVC CRT for all
6670
// programs using the library: ASIO calls SSL_library_init() which calls
6771
// SSL_COMP_get_compression_methods(), which allocates some heap memory and the

0 commit comments

Comments
 (0)