I am writing a TCP concurrent server which will fork a child process to deal with every new connection. Suppose ClientA is interacting with ChildA while server is still listening on same port. In case we kill server with say SIGINT signal, ClientA and ChildA keep on interacting.
So, in that situation if I restart my server, it obviously throws Address already in use on bind function call.
What are all possible solutions to this issue and which one is usually followed?