tsan linux tentative fix / copy string instead of passing a const reference

This commit is contained in:
Benjamin Sergeant 2019-04-29 17:27:53 -07:00
parent e3444e666b
commit 9dca893ce7
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ namespace ix
return _res; 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 // 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 // gone, so we use temporary variables (res) or we pass in by copy everything that

View File

@ -43,7 +43,7 @@ namespace ix
int port, int port,
std::string& errMsg); 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; std::string _hostname;
int _port; int _port;