diff options
-rw-r--r-- | SDL_Core/src/components/application_manager/src/request_controller.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/SDL_Core/src/components/application_manager/src/request_controller.cc b/SDL_Core/src/components/application_manager/src/request_controller.cc index 5021f721b..57e8b77c6 100644 --- a/SDL_Core/src/components/application_manager/src/request_controller.cc +++ b/SDL_Core/src/components/application_manager/src/request_controller.cc @@ -152,13 +152,15 @@ void RequestController::terminateAppRequests( { AutoLock auto_lock(request_list_lock_); std::list<Request>::iterator it = request_list_.begin(); - for (; request_list_.end() != it; ++it) { + while (request_list_.end() != it) { const commands::CommandRequestImpl* request_impl = static_cast<commands::CommandRequestImpl*>(it->get()); if (request_impl->connection_key() == app_id) { watchdog_->removeRequest( request_impl->connection_key(), request_impl->correlation_id()); it = request_list_.erase(it); + } else { + ++it; } } } |