File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -469,7 +469,8 @@ void NearbySharingServiceImpl::RegisterSendSurface(
469
469
return ;
470
470
}
471
471
472
- // Send items in discovery_cache as disabled.
472
+ // All share targets in discovery_cache have received_disabled set to
473
+ // true, send them to new send send surface in discovered events..
473
474
for (const auto & item : discovery_cache_) {
474
475
LOG (INFO) << " Reporting receive_disabled discovery cache target "
475
476
<< item.second .share_target .ToString ()
@@ -3274,6 +3275,8 @@ bool NearbySharingServiceImpl::FindDuplicateInDiscoveryCache(
3274
3275
" changed from: "
3275
3276
<< share_target.id << " to " << it->second .share_target .id
3276
3277
<< " . New endpoint_id: " << endpoint_id;
3278
+ // Share targets in discovery cache have receive_disabled set to true.
3279
+ // Copy only the id field from cache entry,
3277
3280
share_target.id = it->second .share_target .id ;
3278
3281
discovery_cache_.erase (it);
3279
3282
outgoing_share_target_map_.insert_or_assign (endpoint_id, share_target);
Original file line number Diff line number Diff line change @@ -524,6 +524,7 @@ class NearbySharingServiceImpl
524
524
absl::flat_hash_map<int64_t , OutgoingShareSession>
525
525
outgoing_share_session_map_;
526
526
// A map of Endpoint id to DiscoveryCacheEntry.
527
+ // All ShareTargets in discovery cache have received_disabled set to true.
527
528
absl::flat_hash_map<std::string, DiscoveryCacheEntry> discovery_cache_;
528
529
// For metrics. The IDs of ShareTargets that are cancelled while trying to
529
530
// establish an outgoing connection.
You can’t perform that action at this time.
0 commit comments