From efc917f93512640e8a1b50e4b2c53222abf9d3fc Mon Sep 17 00:00:00 2001 From: Wiebe Cazemier Date: Wed, 20 Apr 2022 20:24:55 +0200 Subject: [PATCH] Disconnect with 'topic alias invalid' when going out of range --- client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.cpp b/client.cpp index c6add14..69f303c 100644 --- a/client.cpp +++ b/client.cpp @@ -374,7 +374,7 @@ void Client::setTopicAlias(const uint16_t alias_id, const std::string &topic) // The specs actually say "The Client MUST NOT send a Topic Alias [...] to the Server greater than this value [Topic Alias Maximum]". So, it's not about count. if (alias_id > settings->maxIncomingTopicAliasValue) throw ProtocolError(formatString("Client tried to set more topic aliases than the server max of %d per client", settings->maxIncomingTopicAliasValue), - ReasonCodes::ProtocolError); + ReasonCodes::TopicAliasInvalid); this->incomingTopicAliases[alias_id] = topic; } -- libgit2 0.21.4