My application uses TCP client sockets and FTP. After some time (depending on WIP_NET_OPT_SOCK_MAX parametr) I’m running out of free sockets.
Returned errors are:
Trace CUS4 1 ERRLOG ch_tcp_client.c:751: No more IP buffers available
Trace CUS4 1 ERRLOG ch_tcp_client.c:752: returned WIP_CERR_RESOURCES
Trace CUS4 1 ERRLOG ch_tcp_client.c:107: No more free socket
I’ve tried: wip_close( handle), wip_shutdown (handle, FALSE, TRUE) and wip_close(handle) in WIP_PEER_CLOSE event hadler, wip_shutdown (handle, TRUE, TRUE) and wip_close(handle) in WIP_PEER_CLOSE event hadler, wip_abort( handle ).
Resources leakage exist even if every of the API’s above returns OK.
This happens on OpenAT 4.24d and earlier ones. I’m using Q2686H and Fastrack Supreme 20.
Is there any way to recover used resources in a reasonable amount of time other then dropping GPRS connection?
Is there a way to see how many sockets are actually being used?
Should I farther review my code or is it a known problem with WIP?