• Kyle Horimoto's avatar
    [CrOS Tether] Update connection retry attempt logic. · d5bd9807
    Kyle Horimoto authored
    Before this CL, we allowed 3 retries for the entire connection flow,
    which includes advertising, scanning, creating a GATT connection, and
    exchanging messages. However, it makes more sense to think of this as a
    two-part process:
      (1) Advertising and scanning. This portion always occurs when
          attempting a BLE connection, even if the device we're trying to
          contact is not nearby and cannot respond.
      (2) Creating a GATT connection and exchanging message. This portion
          only occurs when an Android host is nearby to respond to the
          Chromebook.
    
    Connection attempts which fail in part (2) above indicate that the
    device actually is nearby and can potentially connect; additionally
    connection failures during this part of the connection often will
    succeed on a retry. Thus, this CL adds extra connection retry attempts
    if a previous attempt failed in part (2).
    
    Bug: 805218, 672263
    Change-Id: Ifbedc004b96905d3f77662c45bcf2a9210b06c57
    Reviewed-on: https://chromium-review.googlesource.com/889991Reviewed-by: default avatarJeremy Klein <jlklein@chromium.org>
    Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#533073}
    d5bd9807
message_transfer_operation.cc 11.4 KB