Fitbit / bitgatt

The FitbitGatt API is designed to provide a strong state machine around all Android gatt operations with the aim of making Android BLE development across Android vendors as straightforward and side-effect free as possible.
Mozilla Public License 2.0
57 stars 17 forks source link

In case gatt is null reset state to disconnected #48

Closed cristian-ich closed 3 years ago

cristian-ich commented 3 years ago

Fixes # gatt null when gatt connection is Connected

description

In case we reset gatt to null we should also set state to null

changes

cristian-ich commented 3 years ago

The gatt and state are set in a synchronized method. There shouldn't be a race condition there

On Thu, May 13, 2021, 12:21 AM Andy @.***> wrote:

@.**** approved this pull request.

LGTM. Is there a concern about a race between setting the gatt to null and setting the state?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Fitbit/bitgatt/pull/48#pullrequestreview-658392842, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDYGVULJK5DMWFYRW2KEELTNLWMNANCNFSM44V275QA .

ionutlepi commented 3 years ago

Merged already under #49