code: public static void closeQuietly(Socket socket) {
      if (socket != null) {
        try {
          socket.close();
        } catch (AssertionError e) {
          if (!isAndroidGetsocknameError(e)) throw e;
        } catch (RuntimeException rethrown) {
          throw rethrown;
        } catch (Exception ignored) {
        }
      }
    }
docs: Closes {@code socket}, ignoring any checked exceptions. Does nothing if {@code socket} is
  null.