W5500 socket closes

I’ve been using a socket to receive data from a remote host, after a short while, the transfer fails:

And when i check socket status, it is in the “SOCK_CLOSED” state. All of this happens without me explicitly closing the socket. So i’d like to know in what situation would the W5500 close a socket?

Any help is welcome.

Ok, maybe it’s because of timeout.
How can i make sure timeouts do NOT close the socket? Perhaps i could disable it in the Sn_IMR register?

regards