Account removal

Issue #61 closed
Former user created an issue

rocks.xmpp.core.session.NoResponseException: Timeout reached, while waiting on a response. at rocks.xmpp.core.session.XmppSession.sendAndAwait(XmppSession.java:609) at rocks.xmpp.core.session.XmppSession.query(XmppSession.java:537) at rocks.xmpp.core.session.XmppSession.query(XmppSession.java:518) at rocks.xmpp.extensions.register.RegistrationManager.getRegistration(RegistrationManager.java:82)

Above error happens with below code

xmppClient.connect(); RegistrationManager registrationManager = xmppClient.getManager(RegistrationManager.class); registrationManager.setEnabled(true);

    Registration registration = registrationManager.getRegistration();
    if(registration.isRegistered()) {

        registrationManager.cancelRegistration();
    }

Comments (9)

  1. Christian Schudt repo owner

    Thx for reporting. Will look into it. Which server did you use (because it might also be a server issue, if it doesn't return a response).

  2. Chandra Bala

    The server is ejabberd. Registration is possible, but account removal has the above error. Thanks for the quick reply

  3. Christian Schudt repo owner

    I checked this with ejabberd 14.07 and couldn't get the error. I also notice, that you forget to login prior to account removal. Maybe that's the problem.

  4. Christian Schudt repo owner

    You call boshConnection.detach(); which basically closes the connection, i.e. it won't send further HTTP requests.

    Then after that, you want to cancel the registration, which fails, because the connection is inactive. You must not call detach, if you want to work with the connection afterwards.

  5. Christian Schudt repo owner

    I'll close that one, because calling detach() here and then sending stuff is just a misuse of the API. I've added an IllegalStateException when trying to send over an detached or closed BoshConnection.

    Please comment or re-open, if there's still an issue.

  6. Log in to comment