public void assertUsable() throws IOException {
  if (throwable.get() == null) {
    if (connection == null) {
      throw new IOException("Connection is not open");
    }
    return;
  }
  Throwable t=throwable.get();
  if (t instanceof IOException) {
    throw (IOException)t;
  }
 else {
    throw Throwables.propagate(t);
  }
}

public void assertUsable ( ) throws IOException { if ( throwable . get ( ) == null ) { if ( connection == null ) { throw new IOException ( "Connection is not open" ) ; } return ; } Throwable t = throwable . get ( ) ; if ( t instanceof IOException ) { throw ( IOException ) t ; } else { throw Throwables . propagate ( t ) ; } }
before the websocket is used , it ' s recommended to call this method to ensure that any exceptions caught while processing the messages received are acknowledged .
