diff options
Diffstat (limited to 'src/components/connection_handler')
-rw-r--r-- | src/components/connection_handler/src/connection_handler_impl.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc index daca42d3c2..6dd4fe06d7 100644 --- a/src/components/connection_handler/src/connection_handler_impl.cc +++ b/src/components/connection_handler/src/connection_handler_impl.cc @@ -174,12 +174,12 @@ void ConnectionHandlerImpl::OnDeviceRemoved( RemoveConnection(*it); } - device_list_.erase(device_info.device_handle()); sync_primitives::AutoReadLock read_lock(connection_handler_observer_lock_); if (connection_handler_observer_) { connection_handler_observer_->RemoveDevice(device_info.device_handle()); connection_handler_observer_->OnDeviceListUpdated(device_list_); } + device_list_.erase(device_info.device_handle()); } void ConnectionHandlerImpl::OnScanDevicesFinished() { @@ -296,6 +296,7 @@ uint32_t ConnectionHandlerImpl::OnSessionStartedCallback( if (hash_id) { *hash_id = protocol_handler::HASH_ID_WRONG; } + #ifdef ENABLE_SECURITY if (!AllowProtection(get_settings(), service_type, is_protected)) { return 0; @@ -844,6 +845,7 @@ security_manager::SSLContext::HandshakeContext ConnectionHandlerImpl::GetHandshakeContext(uint32_t key) const { return connection_handler_observer_->GetHandshakeContext(key); } + #endif // ENABLE_SECURITY void ConnectionHandlerImpl::StartDevicesDiscovery() { |