oops - I was previously stopping bluetooth before stopping the mesh bluetooth service

which was bad bad
This commit is contained in:
geeksville
2020-03-04 15:56:37 -08:00
parent 425c570757
commit d1b7b6c5c5
3 changed files with 9 additions and 5 deletions

View File

@@ -288,6 +288,7 @@ void setBluetoothEnable(bool on)
else
{
// We have to totally teardown our bluetooth objects to prevent leaks
stopMeshBluetoothService(); // Must do before shutting down bluetooth
deinitBLE();
destroyMeshBluetoothService(); // must do after deinit, because it frees our service
Serial.printf("Shutdown BT: %u heap size\n", ESP.getFreeHeap());