This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TCP socket stuck in ListenState

Hello,

In my application I'm creating 2 TCP sockets on 2 ports.
Both are placed in Listen mode (Server mode)
When an active open is received on one of the ports data is send to this port.
tcp_get_state is used to check the socket's state before sending data.
Only when the state is StateESTABLISHED data is send.
All goes well and I'm able to close the ports and reopen them without issues.

But at some point things go wrong. My application keeps running but the sockets seem to return to their Listen State. Reopening the port from my PC (active open) is not working anymore. It seems no callbacks are generated anymore when opening the port.
So the socket seems to be stuck in Listen State but I'm unable to connect to it.

I found in the documentation that an application inflicted tcp_abort renders the created TCP socket useless. That you have no other option then to destroy the socket and create a new one.
For me it seems to be something like this. Except I don't call tcp_abort from my application.
Is there some scenario that could trigger this? In wireshark I do see some unacknowledged messages.

Any other ideas? Even ideas to reproduce this problem because I'm still unable to trigger this behavior?

Extra details:
* I'm running the RTX RTOS for my application on a LPC1768
* Running V6.2 of the Keil Network Component

Thanks

Gerrit