I am building a server application using CSocket class and threads. In my server app, I create a child thread (worker thread) to handle connection (Accept()) and network I/O (infinite loop). I also create a exit message handler to closes all network connections. Whenever I click the exit button on my server app, my program crashed. Why?? Any solution??