Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix phantom delegate trying to use its referenced gatt instance #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 13, 2015

  1. Fix phantom delegate trying to use its referenced gatt instance

    Prior to the change, when one disconnect a connected device in Android,
    Device instance inserts a delegate to GattCallback instance to cache
    discovered Services. However, when one disconnects such device, the
    delegate is not removed. So upon next device connection, that delegate
    will attempt to reference a disposed Gatt instance and cause a crash.
    
    To reproduce this bug, you can try the following sequence:
    
    1) Scan for Devices
    2) Connect to Device A
    3) Discovers Service of Device A
    4) Dsiconnect Device A
    5) Connect to Device A again
    6) Discovers Service of Device A
    7) Crash
    smoy committed May 13, 2015
    Configuration menu
    Copy the full SHA
    ee75b3d View commit details
    Browse the repository at this point in the history