timesync.cpp fixes

This commit is contained in:
Verkehrsrot 2019-03-28 14:24:10 +01:00
parent 72f9b321f7
commit 14d29e11f3

View File

@ -135,6 +135,7 @@ void process_timesync_req(void *taskparameter) {
// end of time critical section: release I2C bus // end of time critical section: release I2C bus
I2C_MUTEX_UNLOCK(); I2C_MUTEX_UNLOCK();
finish:
lora_time_sync_pending = false; lora_time_sync_pending = false;
timeSyncReqTask = NULL; timeSyncReqTask = NULL;
vTaskDelete(NULL); // end task vTaskDelete(NULL); // end task
@ -142,7 +143,7 @@ void process_timesync_req(void *taskparameter) {
error: error:
ESP_LOGW(TAG, "[%0.3f] Timeserver error: handshake timed out", ESP_LOGW(TAG, "[%0.3f] Timeserver error: handshake timed out",
millis() / 1000.0); millis() / 1000.0);
goto finish; goto finish; // end task
} }
// called from lorawan.cpp after time_sync_req was sent // called from lorawan.cpp after time_sync_req was sent