PingManager: Make exception for feature-not-implemented

Issue #113 closed
Daniel Gultsch
created an issue

The ping manager rightfully makes an exception (=return true despite error) if the pinged entity replies with cancel/service-unavailable. However quite a few implementations will return cancel/feature-not-implemented instead. (ejabberd is an example but there are also a few clients which do (Conversations). I think it would make sense for the Ping Manager to accept feature-not-implemented as well. At least I don't see a downside.

Comments (7)

  1. Daniel Gultsch reporter

    On a related note I don’t understand why the the error response parser only yields true if the response came from a bare JID. I think it is completely legitimate behaviour when the error response (service-unavailable/feature not implemented) comes from a full jid (a client for example)

    If anything it might make some sense to check if input jid is equal to the jid responsding to the error (however they should never be not equal)

    cheers Daniel

  2. Christian Schudt repo owner

    Thanks for reporting. You are right, we could take feature-not-implemented into account as well.

    The bare JID was originally used, because the assumption was, that on exception, the server had responded on behalf of the client, meaning the client is offline. (pong = false). See code comment.

    Need to rethink this. We probably should examine the from attribute of the response as well.

  3. Log in to comment