An interruption occurs in all TCP socket connections when a socket connection is disrupted, either by disconnecting the Ethernet cable or by powering off the device

Hi,

I have established five TCP socket connections using the Network and RTOS libraries.

The system functions correctly until a TCP connection is disrupted, either by disconnecting the Ethernet cable or by suddenly powering off the device. For instance, when Socket 4's Ethernet wire is disconnected abruptly, the timeout counter starts counting down from 60 seconds. Meanwhile, when a new connection for Socket 3 is accepted and its state changes to 'Established,' it sends only one packet and does not transmit any further data during the timeout period.

As the new connection (Socket 3) begins counting down its timeout, sometimes, the timeout for the previously disconnected Socket 4 is reset to 60 seconds. Consequently, the new connection is disconnected more quickly than the timeout for the previously disconnected socket. Upon investigation, I found that the netTCP_SendReady function only operates after the acceptance of a new connection. After that, it returns false during the established connection, which explains why only one packet is sent.

Socket 4

I also checked the thread priority, and all of them work fine.(I've disabled round robin)

What is my mistake? Any help would be appreciated.

0