mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
server
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:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user