Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Throw GattClosed if Gatt is closed during I/O operation #23

Merged
merged 2 commits into from
Oct 29, 2018

Commits on Oct 26, 2018

  1. Throw GattClosed if Gatt is closed during I/O operation

    Typical behavior of `Channel` is to throw a
    `ClosedReceiveChannelException` on invocation of `close` if a `receive`
    is suspended. This is unfortunately a bit counter intuitive and can
    produce misleading stacktraces.
    
    In order to be more explicit with our exception stacktraces related to
    `Channel` cancelation, using `receiveOrNull` and explicitly throwing
    `GattClosed` exception when receiving `null`.
    
    May need to revisit this behavior in the future after `receiveOrClosed`
    is implemented per Kotlin/kotlinx.coroutines#330. Also noteworthy is
    that `receiveOrNull` was undeprecated via Kotlin/kotlinx.coroutines#739.
    twyatt committed Oct 26, 2018
    Configuration menu
    Copy the full SHA
    c7743db View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2018

  1. Configuration menu
    Copy the full SHA
    d6d41b2 View commit details
    Browse the repository at this point in the history