w5500 halted in send or receive socket

Hi! I use iolibrary from wiznet and approximately one time a week code halted in send or receive routines i suppouse socket state does not change bu why?

freesize = getSn_TX_FSR(sn);
tmp = getSn_SR(sn);
if ((tmp != SOCK_ESTABLISHED) && (tmp != SOCK_CLOSE_WAIT))
if( (sock_io_mode & (1<<sn)) && (len > freesize) ) return SOCK_BUSY;
if(len <= freesize) break;


My payload have 50 bytes maximum size. I cant understand what happened. I suppouse connection broke when socket begin send o receive data.


May I know how the socket doesn’t change?

First of all, I’ll attach the WIZnet library we’re providing. This code works well without errors.

The chords might be tangled, so I recommend you porting the io library again.

Thank you.

Thank you for the reply, @louis.I attache the wireshark screenshot. May be this help to resolve situation. is ip of wizznet board. Because errors ocured very rarely is too hard to discover problem.