Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

SNTP fails after being repeatedly called. #2

Open
jondurrant opened this issue Mar 4, 2022 · 0 comments
Open

SNTP fails after being repeatedly called. #2

jondurrant opened this issue Mar 4, 2022 · 0 comments

Comments

@jondurrant
Copy link

If I call the code insert below every 5 second for a couple of dozen times the SNTP function starts to constantly fail.
SNTP_init(SOCKET_SNTP, sntpSvrIp, tz, pEthernetBuf );

for (uint8_t i=0; i < 5; i++){
	res = SNTP_run(&d);
	if (d.yy >= 2022){
		break;
	}
	vTaskDelay(10);
}
if (d.yy < 2022){
	printf("SNTP Failed %d\n", res);
	printf("Failed: %d-%d-%d %d:%d:%d\n", d.yy, d.mo, d.dd, d.hh, d.mm, d.ss);
	return false;
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant