Increate SNTP timeout 3s->5s. Change mg_sntp_send() to mg_sntp_request(), remove one unnecessary parameter

This commit is contained in:
Sergey Lyubka committed 2022-05-15 18:41:01 +01:00
1 parent 6db1d7925e
commit f5fd176b35
10 files changed
+17 -21

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ static void sfn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
static void timer_fn(void *arg) {
struct mg_mgr *mgr = (struct mg_mgr *) arg;
if (s_sntp_conn == NULL) s_sntp_conn = mg_sntp_connect(mgr, NULL, sfn, NULL);
if (s_boot_timestamp < 9999) mg_sntp_send(s_sntp_conn, time(NULL));
if (s_boot_timestamp < 9999) mg_sntp_request(s_sntp_conn);
}
// Use Zephyr's printk() for Mongooose MG_* logging