title: How do you handle Socket Disconnecting in Java?
body: <p>Hey all.  I have a server written in java using the ServerSocket and Socket classes. </p>
  
  <p>I want to be able to detect and handle disconnects, and then reconnect a new client if necessary.</p>
  
  <p>What is the proper procedure to detect client disconnections, close the socket, and then accept new clients?</p>