Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/forms/SettingsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ void SettingsDialog::FillSessionTable()
invalidateButtonLayout->setContentsMargins(0, 0, 0, 0);
invalidateButtonWidget->setLayout(invalidateButtonLayout);
ui->websocketSessionTable->setCellWidget(i, 4, invalidateButtonWidget);
connect(invalidateButton, &QPushButton::clicked, [=]() { webSocketServer->InvalidateSession(session.hdl); });
connect(invalidateButton, &QPushButton::clicked,
[webSocketServer, session]() { webSocketServer->InvalidateSession(session.hdl); });

i++;
}
Expand Down
2 changes: 1 addition & 1 deletion src/websocketserver/WebSocketServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ void WebSocketServer::onMessage(websocketpp::connection_hdl hdl,
{
auto opCode = message->get_opcode();
std::string payload = message->get_payload();
_threadPool.start(Utils::Compat::CreateFunctionRunnable([=]() {
_threadPool.start(Utils::Compat::CreateFunctionRunnable([hdl, payload, opCode, this]() {
std::unique_lock<std::mutex> lock(_sessionMutex);
SessionPtr session;
try {
Expand Down
2 changes: 1 addition & 1 deletion src/websocketserver/WebSocketServer_Protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void WebSocketServer::BroadcastEvent(uint64_t requiredIntent, const std::string
if (!_server.is_listening() || !_obsReady)
return;

_threadPool.start(Utils::Compat::CreateFunctionRunnable([=]() {
_threadPool.start(Utils::Compat::CreateFunctionRunnable([eventType, requiredIntent, eventData, rpcVersion, this]() {
// Populate message object
json eventMessage;
eventMessage["op"] = 5;
Expand Down
Loading