The SNTP_oneshot() takes 3 minutes to timeout regardless of the parameter passed in. How do we fix this?
Solved! Go to Solution.
Hi Michael:
It doesn't ignore timeout. If I SNTP_oneshot an IP that at different subnet and the gateway is reachable, I get correct 3 s timeout.
If I SNTP_oneshot AN IP at different subnet via unreachable gateway, I get 180s timeout. with RTCS_ARP_CANT_RESOLVE error code. There is a 3 minites timer in the RTCS ARP implementation.
Regards
Daniel
Will I break anything if I add the following before using the socket in SNTP_timed_send_recv()?
timeout = TRUE;
error_code = setsockopt(sock, SOL_UDP, OPT_SEND_NOWAIT, &timeout, sizeof(timeout));
Hi Michael:
It doesn't ignore timeout. If I SNTP_oneshot an IP that at different subnet and the gateway is reachable, I get correct 3 s timeout.
If I SNTP_oneshot AN IP at different subnet via unreachable gateway, I get 180s timeout. with RTCS_ARP_CANT_RESOLVE error code. There is a 3 minites timer in the RTCS ARP implementation.
Regards
Daniel