mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Try and reduce device switching crashing a bit
This commit is contained in:
parent
c14ff8d075
commit
3f4f493d69
1 changed files with 2 additions and 0 deletions
|
|
@ -216,8 +216,10 @@ struct Connect: View {
|
|||
if bleManager.connectedPeripheral != nil && bleManager.connectedPeripheral.peripheral.state == CBPeripheralState.connected {
|
||||
bleManager.disconnectPeripheral()
|
||||
}
|
||||
context.reset()
|
||||
do {
|
||||
PersistenceController.shared.clearDatabase()
|
||||
|
||||
} catch let error {
|
||||
print("💣 Failed to re-create CoreData database: " + error.localizedDescription)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue