Skip to content

Commit

Permalink
[CrOS Tether] Cover all edge cases for BLE connections.
Browse files Browse the repository at this point in the history
We've seen some recent crashes (e.g., crbug.com/756188) which result
from the BluetoothLowEnergyWeaveClientConnection class. I have not been
able to track down exactly how this crash is caused, but with this CL, I
cover all possible edge cases which could cause a crash and added lots
of extra logging which will help us catch this issue.

For now, this CL should prevent a crash while we continue to debug.

Bug: 756188, 672263
Change-Id: Ibe8f406bd830fb7ed6b7fb21d61be05068e81cea
Reviewed-on: https://chromium-review.googlesource.com/634207
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: Tim Song <tengs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497318}
  • Loading branch information
Kyle Horimoto authored and Commit Bot committed Aug 25, 2017
1 parent 24b9cba commit 1a5027d
Show file tree
Hide file tree
Showing 15 changed files with 539 additions and 681 deletions.
3 changes: 2 additions & 1 deletion chromeos/components/tether/disconnect_tethering_operation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,14 @@ void DisconnectTetheringOperation::OnMessageSent(int sequence_number) {
return;

has_sent_message_ = true;
UnregisterDevice(remote_device_);

DCHECK(!disconnect_start_time_.is_null());
UMA_HISTOGRAM_TIMES(
"InstantTethering.Performance.DisconnectTetheringRequestDuration",
clock_->Now() - disconnect_start_time_);
disconnect_start_time_ = base::Time();

UnregisterDevice(remote_device_);
}

void DisconnectTetheringOperation::SetClockForTest(
Expand Down
Loading

0 comments on commit 1a5027d

Please sign in to comment.