I created a code for STM32H743ZI lwip RTOS socket server that can connect multiple clients ,I've an issue in binding of server to socket after terminating and recreating the server thread when ethernet cable is removed and reconnected.
Termination of server thread and closing the connection is done in the disconnection of ethernet cable and the thread is recreated when ethernet cable is reconnected, the accepted clients run in separate threads. I am also terminating client handle treads and closing connection of clients when the ethernet cable is removed . the client handling threads are created from the main server thread when a successful accept is happened in server.
- When only server thread is active, when ethernet cable is removed the thread is terminated and connection is closed ,The server thread is recreated when the ethernet cable is reconnected and the binding of server to socket is successful.
- When server thread and client handle threads are active ,When ethernet cable is removed the client handle threads and server thread is terminated and closed all the client connections and server connection , When the ethernet cable is reconnected the server thread is recreated ,But the binding of server to socket is not happening
Why binding of server to socket is not happening in case 2 ?
