Shut down the application
1.9. Shutting Down Your Application If you ran the TimeClient, you must have noticed that the application doesn't exit but just keep running doing nothing. Looking from the full stack trace, you will also find a couple I/O threads are running. To shut down the I/O threads and let the application exit gracefully, you need to release the resources allocated by ChannelFactory. The shutdown process of a typical network application is composed of the following three steps: Close all server sockets if there are any, Close all non-server sockets (i.e. client sockets and accepted sockets) if there are any, and Release all resources used by ChannelFactory.