Skip to content

Commit

Permalink
Fix client advertised channels not being updated on unadvertise (#132)
Browse files Browse the repository at this point in the history
**Public-Facing Changes**
None


**Description**
When a client unadvertised a channel, we did not update the client's
publications list, leading to lots of
`Ignoring client unadvertisement from ... for unknown channel ...,`
messages once the client disconnected
  • Loading branch information
achim-k committed Jan 11, 2023
1 parent 9f3e62f commit c31d92c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,11 @@ inline void Server<ServerConfiguration>::handleTextMessage(ConnHandle hdl, const
continue;
}
clientPublications.erase(channelIt);
if (const auto advertisedChannelIt = clientInfo.advertisedChannels.find(channelId) !=
clientInfo.advertisedChannels.end()) {
clientInfo.advertisedChannels.erase(advertisedChannelIt);
}

if (_clientUnadvertiseHandler) {
_clientUnadvertiseHandler(channelId, hdl);
}
Expand Down

0 comments on commit c31d92c

Please sign in to comment.