[CrOS MultiDevice] Fix crash when cancelling connection attempt.
The crash was caused by attempting to cancel and/or update the priority of a connection attempt which had not yet started. Starting a connection is posted in an asynchronous task, so it is possible that the connection attempt is canceled before it has been attempted. In this case, we were erroneously assuming that the connection attempt metadata had already been set when it actually had not. This CL fixes this race condition by explicitly checking if the connection has been attempted before performing any operation which touches connection metadata. Bug: 888073 Change-Id: I183202863f8e018b5dfdf77e1b208843217689e7 Reviewed-on: https://chromium-review.googlesource.com/c/1338322Reviewed-by:Ryan Hansberry <hansberry@chromium.org> Commit-Queue: Kyle Horimoto <khorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#608517}
Showing
Please register or sign in to comment