Commit efc917f93512640e8a1b50e4b2c53222abf9d3fc
1 parent
3f53ee96
Disconnect with 'topic alias invalid' when going out of range
Showing
1 changed file
with
1 additions
and
1 deletions
client.cpp
| ... | ... | @@ -374,7 +374,7 @@ void Client::setTopicAlias(const uint16_t alias_id, const std::string &topic) |
| 374 | 374 | // 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. |
| 375 | 375 | if (alias_id > settings->maxIncomingTopicAliasValue) |
| 376 | 376 | throw ProtocolError(formatString("Client tried to set more topic aliases than the server max of %d per client", settings->maxIncomingTopicAliasValue), |
| 377 | - ReasonCodes::ProtocolError); | |
| 377 | + ReasonCodes::TopicAliasInvalid); | |
| 378 | 378 | |
| 379 | 379 | this->incomingTopicAliases[alias_id] = topic; |
| 380 | 380 | } | ... | ... |