Catch exception propagating to Server dtor (#7416)

* Catch throw in dtor

* Update ChangeLog
This commit is contained in:
Nick Bolton
2024-07-29 23:11:59 +01:00
committed by GitHub
parent c9e11a6fdc
commit a99d1ca87d
3 changed files with 12 additions and 2 deletions

View File

@ -2071,7 +2071,12 @@ void Server::closeClient(BaseClientProxy *client, const char *msg) {
// move client to closing list
removeClient(client);
m_oldClients.insert(std::make_pair(client, timer));
try {
m_oldClients.insert(std::make_pair(client, timer));
} catch (std::exception &e) { // NOSONAR
LOG((CLOG_ERR "failed to append old client: %s", e.what()));
}
// if this client is the active screen then we have to
// jump off of it