diff --git a/ws/ixcobra/IXCobraConnection.cpp b/ws/ixcobra/IXCobraConnection.cpp index 979925c7..0bccca9a 100644 --- a/ws/ixcobra/IXCobraConnection.cpp +++ b/ws/ixcobra/IXCobraConnection.cpp @@ -192,7 +192,7 @@ namespace ix { if (!handleUnsubscriptionResponse(data)) { - invokeErrorCallback("Error processing subscribe response", msg->str); + invokeErrorCallback("Error processing unsubscribe response", msg->str); } } else if (action == "rtm/unsubscribe/error") diff --git a/ws/snake/IXSnakeProtocol.cpp b/ws/snake/IXSnakeProtocol.cpp index 495f7beb..f156d18a 100644 --- a/ws/snake/IXSnakeProtocol.cpp +++ b/ws/snake/IXSnakeProtocol.cpp @@ -287,12 +287,18 @@ namespace snake const AppConfig& appConfig, const nlohmann::json& pdu) { + // extract subscription_id + auto body = pdu["body"]; + auto subscriptionId = body["subscription_id"]; + state->redisClient().stop(); nlohmann::json response = { {"action", "rtm/unsubscribe/ok"}, {"id", pdu.value("id", 1)}, - {"body", {}} + {"body", { + {"subscription_id", subscriptionId} + }} }; ws->sendText(response.dump()); }