code: public static IOException create(String msg, IOException exn)
    {
      if (exn.getClass().equals(IOException.class)
          || exn.getClass().equals(java.net.SocketException.class)
          || exn.getClass().getName().equals("javax.net.ssl.SSLException")) {
        return new ClientDisconnectException(msg, exn);
      }
      else
        return exn;
    }
docs: Only create a disconnect exception if it's an IOException
  Possible later check for broken pipe.