sock_close(): Time to fully close socket?

I’m using an RCM6600W with code which calls tcp_tick() just about once every 80ms.

If I establish a connection, receive a small amount of data, wait 15 seconds, and then call sock_close, I’ve found that waiting up to 30 seconds does not provide enough time to actually fully close the socket (ie sock_alive() still says the socket is alive after 30 seconds).

EDIT: Turns out it just takes a large amount of time for a final FIN/ACK to be sent back from the server. Over a minute.

Turns out it just takes a large amount of time for a final FIN/ACK to be sent back from the server. Over a minute.