AnsweredAssumed Answered

Socket Accept abort behaviour problem

Question asked by Chris Solomon on Dec 26, 2013
Latest reply on Jan 10, 2014 by Larry DeMuth


I am working on a product which uses the Telnet server code supplied with RTCS.

In the product the server needs to be started and stopped on demand.

During testing it was noticed that the server creates 2 sockets when started, but when the server is shut down only one socket is closed.


I have looked through the code and it seems that in the  SOCK_STREAM_accept function a new socket is created, then the task blocks waiting for a connection.

When the server is shut down, the task exit handler is called, which frees the first socket, but the second socket is left.


This process is repeated each time the server is started or stopped.


Is there any work-around you can suggest for this?