[CrOS PhoneHub] Wait for disconnection event before invoking callback
Previously, we'd just call DisconnectFromEndpoint() and invoke the callback immediately. This CL adds a "disconnecting" state which waits for the OnDisconnected() callback to be called. This works around a race condition in the Nearby Connections library during shutdown. Because we're now waiting for an event to be called, this CL also adds timeouts for each step of this flow. This CL also tweaks the log level for a few logs to help with debugging. Bug: 1152609 Change-Id: Ib23c606e4658f5ad1f5fbf013891d80888683530 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2561469Reviewed-by:James Vecore <vecore@google.com> Commit-Queue: Kyle Horimoto <khorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#831160}
Showing
This diff is collapsed.
Please register or sign in to comment