Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any event if session-initiate iq receives an error? #2

Open
rhashimoto opened this issue Apr 18, 2016 · 0 comments
Open

Is there any event if session-initiate iq receives an error? #2

rhashimoto opened this issue Apr 18, 2016 · 0 comments

Comments

@rhashimoto
Copy link

I am able to use my own jingle-session subclass to establish a WebRTC connection between two web pages using stanza.io for signaling. It works fine in the absence of errors and I'm now trying to ensure it behaves properly when errors are present.

In the case where the receiving side declines to make the connection (using session.decline()), things work fine - I catch that with a terminated event on the initiating jingle-session. But in the case where the receiving side drops its connection and is unavailable, the XMPP server replies to the jingle session-initiate iq with an error, e.g.:

<body xmlns='http://jabber.org/protocol/httpbind' ack='4625416880'>
  <iq type="error" id="abfd3d62-1036-4ede-bd89-a0f2c5c118d0" from="receiver@server/resource" to="initiator@server/resource" xmlns="jabber:client">
    [copy of original jingle request omitted]
    <error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error>
  </iq>
</body>

I don't see a way at the jingle-session level to detect that. Does one exist?

At the moment I am detecting failed connections using a timeout, but this occurs much later than the failure actually occurs. I could parse the XML traffic but that is pretty tedious. I'm hoping there is some other mechanism I have overlooked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant