summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2017-09-28 13:11:08 -0400
committerGitHub <noreply@github.com>2017-09-28 13:11:08 -0400
commit09fc466b04a37a3f69699930fdeb4171d359bb9c (patch)
tree38185f2a4271fbf6ac3c8cdc999f19e084ef84a8
parentb45d016761fdcb571a4969aa50b2a56b5041c105 (diff)
parentb67600886bb7d4703859e01f4b88c0d6a9070424 (diff)
downloadsdl_core-09fc466b04a37a3f69699930fdeb4171d359bb9c.tar.gz
Merge pull request #1791 from BrandonHe/hotfix/connection_list_lock_release
hotfix connection list lock is not released
-rw-r--r--src/components/connection_handler/src/connection_handler_impl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc
index 6dd4fe06d7..bd5b3d79bb 100644
--- a/src/components/connection_handler/src/connection_handler_impl.cc
+++ b/src/components/connection_handler/src/connection_handler_impl.cc
@@ -564,6 +564,7 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
ConnectionList::iterator it = connection_list_.find(connection_handle);
if (connection_list_.end() == it) {
LOG4CXX_WARN(logger_, "Unknown connection!");
+ connection_list_lock_.Release();
return 0;
}
std::pair<int32_t, Connection*> connection_item = *it;
@@ -1122,6 +1123,7 @@ void ConnectionHandlerImpl::OnConnectionEnded(
ConnectionList::iterator itr = connection_list_.find(connection_id);
if (connection_list_.end() == itr) {
LOG4CXX_ERROR(logger_, "Connection not found!");
+ connection_list_lock_.Release();
return;
}
std::auto_ptr<Connection> connection(itr->second);