This exception is thrown, when you try to bind a ServerSocket to a port, on which another application (perhaps, another ServerSocket is bonded). Here, when you close connection, your server continue...