Skip to content

Commit

Permalink
Close BluetoothGatt after disconnect.
Browse files Browse the repository at this point in the history
This would cause issues on some readers with some devices. Left previous connection open and was prone to further unexpected communications.
  • Loading branch information
dyiop authored Oct 10, 2023
1 parent 4592ed6 commit eaf15c0
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ void drainWritingQueue() {
Logger.d(TAG, "Chunk is length 0, shutting down GattClient");
try {
mGatt.disconnect();
mGatt.close();
} catch (SecurityException e) {
Logger.e(TAG, "Caught SecurityException while shutting down: " + e);
}
Expand Down

0 comments on commit eaf15c0

Please sign in to comment.