Skip to content
Snippets Groups Projects
Unverified Commit c39026c4 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

connectionmanager: call pending callbacks before erase pending connection

This avoid to lock a pending request

Change-Id: Id73cf58fd1434a898e28b52296a0bd4a9f6b7ea0
Gitlab: #209
parent adccb413
Branches
No related tags found
No related merge requests found
...@@ -710,6 +710,7 @@ ConnectionManager::closeConnectionsWith(const std::string& deviceId) ...@@ -710,6 +710,7 @@ ConnectionManager::closeConnectionsWith(const std::string& deviceId)
auto it = pimpl_->pendingCbs_.begin(); auto it = pimpl_->pendingCbs_.begin();
while (it != pimpl_->pendingCbs_.end()) { while (it != pimpl_->pendingCbs_.end()) {
if (it->first.first == deviceId) { if (it->first.first == deviceId) {
if (it->second) it->second(nullptr);
it = pimpl_->pendingCbs_.erase(it); it = pimpl_->pendingCbs_.erase(it);
} else { } else {
++it; ++it;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment