Ensures that the message parser returns a default "{}" response after handling an event, preventing unintended empty responses.
Also, this change avoids sending empty messages to the client unnecessarily.
This commit is contained in:
2026-02-14 14:32:33 +01:00
parent c8ea8185b4
commit fbf8f53090
2 changed files with 2 additions and 6 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ Simulators::Simulators(uint16_t port, QString can_dev, QString uart_dev, QObject
connect(m_server, &Websocket::on_message, this, [this](QWebSocket *conn, QString message) {
QString response = message_parser(message);
if (response.isEmpty() || response == "{}")
if (response == "{}")
return;
m_server->send(conn, response);
});