public static ServerSocket closeSilently(ServerSocket socket){
  if (socket != null) {
    try {
      socket.close();
    }
 catch (    IOException e) {
    }
  }
  return null;
}

public static ServerSocket closeSilently ( ServerSocket socket ) { if ( socket != null ) { try { socket . close ( ) ; } catch ( IOException e ) { } } return null ; }
close a server socket and ignore any exceptions .
