Everything works fine.
But if execution of my_code() takes more than 60 sec. httpclient hangs on connect(sn, Domain_IP, PORT_HTTPS);
Error SOCKERR_TIMEOUT is generated and program exits loop.
How this problem can be solved?
Hi,
managed to eliminate previous error SOCKERR_TIMEOUT .
Client is communicating with server rather reliably via GET/POST.
But similar problem remains: if there is a significant interval in time (the duration can’t be predicted) between lan activity, pause occurs in socket.c loop “while”:
connect(sn). While looping getSn_SR(sn) is equal to SOCK_SYNSENT (0x15).
...
while(getSn_SR(sn) != SOCK_ESTABLISHED)
{
if (getSn_IR(sn) & Sn_IR_TIMEOUT)
{
setSn_IR(sn, Sn_IR_TIMEOUT);
#if _WIZCHIP_ == 5200 // for W5200 ARP errata
setSUBR((uint8_t*)"\x00\x00\x00\x00");
#endif
return SOCKERR_TIMEOUT;
}
}...
or disconnect(sn). While looping getSn_SR(sn) is equal to SOCK_LAST_ACK (0x1D).
...
while(getSn_SR(sn) != SOCK_CLOSED)
{
if(getSn_IR(sn) & Sn_IR_TIMEOUT)
{
close(sn);
return SOCKERR_TIMEOUT;
}
}...
Is it possible to get out without delay and what is the reason of this problem?