diff --git a/src/musikcore/net/WebSocketClient.cpp b/src/musikcore/net/WebSocketClient.cpp index 34fbf5972..81ff9c4e3 100644 --- a/src/musikcore/net/WebSocketClient.cpp +++ b/src/musikcore/net/WebSocketClient.cpp @@ -261,7 +261,7 @@ void WebSocketClient::Reconnect() { auto timeout = prefs->GetInt(core::prefs::keys::RemoteLibraryLatencyTimeoutMs, 5000); this->SetState(State::Connecting); - this->thread = std::make_shared([&]() { + this->thread = std::make_shared([&, timeout]() { std::string uri; {