summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandonHe <lovinghesl@hotmail.com>2017-04-28 15:31:54 +0800
committerBrandonHe <lovinghesl@hotmail.com>2017-04-28 15:31:54 +0800
commitb67600886bb7d4703859e01f4b88c0d6a9070424 (patch)
treea4fb3e91ff8d04f4466dc7d86dccb0db99fae060
parente4b15fea129d9061e87e2fce5d0e99dbd4383ed6 (diff)
downloadsdl_core-b67600886bb7d4703859e01f4b88c0d6a9070424.tar.gz
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 62a1f46fba..a562c76cc1 100644
--- a/src/components/connection_handler/src/connection_handler_impl.cc
+++ b/src/components/connection_handler/src/connection_handler_impl.cc
@@ -388,6 +388,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;
@@ -944,6 +945,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);