From 2f8ecbe61059636d4678774c2356d6fa2fafe199 Mon Sep 17 00:00:00 2001 From: hai007 Date: Tue, 10 Jan 2023 08:52:24 -0800 Subject: [PATCH] Fix a bug in which an iterator is compared to an end iterator from a different hashtable. PiperOrigin-RevId: 501007094 --- internal/platform/implementation/g3/wifi_lan.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/platform/implementation/g3/wifi_lan.cc b/internal/platform/implementation/g3/wifi_lan.cc index 70aaef3b..6260768b 100644 --- a/internal/platform/implementation/g3/wifi_lan.cc +++ b/internal/platform/implementation/g3/wifi_lan.cc @@ -311,7 +311,8 @@ std::unique_ptr WifiLanMedium::ConnectToService( { absl::MutexLock medium_lock(&remote_medium->mutex_); auto item = remote_medium->server_sockets_.find(socket_name); - server_socket = item != server_sockets_.end() ? item->second : nullptr; + server_socket = + item != remote_medium->server_sockets_.end() ? item->second : nullptr; if (server_socket == nullptr) { NEARBY_LOGS(ERROR) << "G3 WifiLan Failed to find WifiLan Server socket: socket_name="