diff --git a/src/plugins/websocket_remote/WebSocketServer.cpp b/src/plugins/websocket_remote/WebSocketServer.cpp index 2a5e1a3dd..f45e31d50 100644 --- a/src/plugins/websocket_remote/WebSocketServer.cpp +++ b/src/plugins/websocket_remote/WebSocketServer.cpp @@ -452,10 +452,10 @@ void WebSocketServer::RespondWithInvalidRequest(connection_hdl connection, const json error = { { message::name, name }, { message::id, id }, - { message::options,{ - { key::error, value::invalid } - } } + { message::type, type::response }, + { message::options,{{ key::error, value::invalid }} } }; + wss->send(connection, error.dump().c_str(), websocketpp::frame::opcode::text); }