Fix data race in WebSocket where _url is accessed without protection in setThreadName

Also fix with url usage + docker container uses fedora and works with tsan
This commit is contained in:
Benjamin Sergeant
2019-04-25 16:07:49 -07:00
parent d37ed300e2
commit 9367a1feff
7 changed files with 34 additions and 45 deletions

View File

@ -56,7 +56,7 @@ namespace ix
const std::string& endpoint,
const std::string& rolename,
const std::string& rolesecret,
WebSocketPerMessageDeflateOptions webSocketPerMessageDeflateOptions);
const WebSocketPerMessageDeflateOptions& webSocketPerMessageDeflateOptions);
static void setTrafficTrackerCallback(const TrafficTrackerCallback& callback);
@ -135,10 +135,8 @@ namespace ix
std::unique_ptr<WebSocket> _webSocket;
/// Configuration data
std::string _appkey;
std::string _endpoint;
std::string _role_name;
std::string _role_secret;
std::string _roleName;
std::string _roleSecret;
std::atomic<CobraConnectionPublishMode> _publishMode;
// Can be set on control+background thread, protecting with an atomic