Commit 60e64cf9e1fcf53369b64d9874daf3ac8128bef1
1 parent
b5af42be
Remove the correct session
Showing
1 changed file
with
1 additions
and
1 deletions
subscriptionstore.cpp
| @@ -500,7 +500,7 @@ void SubscriptionStore::removeSession(const std::string &clientid) | @@ -500,7 +500,7 @@ void SubscriptionStore::removeSession(const std::string &clientid) | ||
| 500 | 500 | ||
| 501 | logger->logf(LOG_DEBUG, "Removing session of client '%s'.", clientid.c_str()); | 501 | logger->logf(LOG_DEBUG, "Removing session of client '%s'.", clientid.c_str()); |
| 502 | 502 | ||
| 503 | - auto session_it = sessionsById.begin(); | 503 | + auto session_it = sessionsById.find(clientid); |
| 504 | if (session_it != sessionsById.end()) | 504 | if (session_it != sessionsById.end()) |
| 505 | { | 505 | { |
| 506 | sessionsById.erase(session_it); | 506 | sessionsById.erase(session_it); |