mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Don't check IsDiscovering() when going to rotate endpoint ID
PiperOrigin-RevId: 601489921
This commit is contained in:
committed by
Copybara-Service
parent
f112d9ff71
commit
d1a6913017
@@ -982,7 +982,7 @@ void ClientProxy::RemoveAllEndpoints() {
|
||||
|
||||
void ClientProxy::OnSessionComplete() {
|
||||
MutexLock lock(&mutex_);
|
||||
if (connections_.empty() && !IsAdvertising() && !IsDiscovering()) {
|
||||
if (connections_.empty() && !IsAdvertising()) {
|
||||
local_endpoint_id_.clear();
|
||||
|
||||
analytics_recorder_->LogSession();
|
||||
|
||||
@@ -991,7 +991,9 @@ TEST_F(ClientProxyTest,
|
||||
// After
|
||||
OnDiscoveryConnectionDisconnected(&client2_, advertising_endpoint);
|
||||
client2_.GetAnalyticsRecorder().Sync();
|
||||
EXPECT_EQ(event_logger2_.GetCompleteClientSessionCount(), 0);
|
||||
// Since we are no longer checking IsDiscovering(), we complete sessions now
|
||||
// solely based on advertising.
|
||||
EXPECT_EQ(event_logger2_.GetCompleteClientSessionCount(), 1);
|
||||
}
|
||||
|
||||
TEST_F(ClientProxyTest, LogSessionForResetClientProxy) {
|
||||
|
||||
Reference in New Issue
Block a user