Skip to content

Commit

Permalink
Reset connected device bluetooth state on disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoncal committed Jul 16, 2024
1 parent b7a993c commit 6c35747
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Improv-iOS/BluetoothManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ final class BluetoothManager: NSObject, BluetoothManagerProtocol {
}

func disconnectFromDevice(_ peripheral: CBPeripheral) {
bluetoothGatt = nil
centralManager.cancelPeripheralConnection(peripheral)
}

Expand Down
1 change: 1 addition & 0 deletions Improv-iOS/ImprovManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public final class ImprovManager: NSObject, ImprovManagerProtocol {
}

public func disconnectFromDevice(_ peripheral: CBPeripheral) {
connectedDevice = nil
bluetoothManager.disconnectFromDevice(peripheral)
}

Expand Down

0 comments on commit 6c35747

Please sign in to comment.