public synchronized void disonnect(){
  try {
    requestedDisconnect=true;
    if (s != null) {
      s.close();
    }
  }
 catch (  IOException ex) {
    LOGGER.warning("Failed closing connection: " + ex);
  }
}

public synchronized void disonnect ( ) { try { requestedDisconnect = true ; if ( s != null ) { s . close ( ) ; } } catch ( IOException ex ) { LOGGER . warning ( "Failed closing connection: " + ex ) ; } }
disconnect from the server . currently connecting to the server only works once , since it ' s intended to stay connected all the time , so using this should only be done when the program is closed .
