1. Ensure that recalibration doesn't cause issues with failing to pause watchdog and clear flags
2. Ensure all credentials are purged on device deletion to avoid security issues 3. Clear calibration state (set to false) on device deletion.
This commit is contained in:
@@ -104,6 +104,8 @@ static void socketio_event_handler(void *handler_args, esp_event_base_t base,
|
||||
statusResolved = true;
|
||||
} else {
|
||||
printf("Device authentication failed\n");
|
||||
calib.clearCalibrated();
|
||||
deleteWiFiAndTokenDetails();
|
||||
connected = false;
|
||||
statusResolved = true;
|
||||
}
|
||||
@@ -119,6 +121,8 @@ static void socketio_event_handler(void *handler_args, esp_event_base_t base,
|
||||
printf("Server message: %s\n", message->valuestring);
|
||||
}
|
||||
}
|
||||
calib.clearCalibrated();
|
||||
deleteWiFiAndTokenDetails();
|
||||
connected = false;
|
||||
statusResolved = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user