Skip to content

Commit f6d59b7

Browse files
committed
Fix [issue VSChina#12](VSChina#12) and [issue 18](VSChina#18)
``` assertion "Operating mode must not be set while SNTP client is running" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/apps/sntp/sntp.c", line 600, function: sntp_setoperatingmode ``` `SNTP_Deinit();` required before `sntp_setoperatingmode(SNTP_OPMODE_POLL);` if SNTP was initialized already.
1 parent 5e8ffb2 commit f6d59b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/az_iot/c-utility/pal/lwip/sntp_lwip.c

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ int SNTP_SetServerName(const char* serverName)
3636
int SNTP_Init()
3737
{
3838
LogInfo("Initializing SNTP");
39+
SNTP_Deinit();
3940
sntp_setoperatingmode(SNTP_OPMODE_POLL);
4041
sntp_init();
4142
time_t ts = 0;

0 commit comments

Comments
 (0)