From 9dca893ce7c15f37939f814562a46a97f631c94c Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Mon, 29 Apr 2019 17:27:53 -0700 Subject: [PATCH] tsan linux tentative fix / copy string instead of passing a const reference --- ixwebsocket/IXDNSLookup.cpp | 2 +- ixwebsocket/IXDNSLookup.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ixwebsocket/IXDNSLookup.cpp b/ixwebsocket/IXDNSLookup.cpp index d2a53f62..e653b112 100644 --- a/ixwebsocket/IXDNSLookup.cpp +++ b/ixwebsocket/IXDNSLookup.cpp @@ -146,7 +146,7 @@ namespace ix return _res; } - void DNSLookup::run(uint64_t id, const std::string& hostname, int port) // thread runner + void DNSLookup::run(uint64_t id, std::string hostname, int port) // thread runner { // We don't want to read or write into members variables of an object that could be // gone, so we use temporary variables (res) or we pass in by copy everything that diff --git a/ixwebsocket/IXDNSLookup.h b/ixwebsocket/IXDNSLookup.h index 28f5adcb..1fa1e8a3 100644 --- a/ixwebsocket/IXDNSLookup.h +++ b/ixwebsocket/IXDNSLookup.h @@ -43,7 +43,7 @@ namespace ix int port, std::string& errMsg); - void run(uint64_t id, const std::string& hostname, int port); // thread runner + void run(uint64_t id, std::string hostname, int port); // thread runner std::string _hostname; int _port;