I am using Socket communication in one of my Java applications.As I know if the program meets any abnormal termination the listening ports does not get closed and the progra
You want to set the SO_REUSEADDR flag on the socket.
See setReuseAddress().