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

sendIQ didn't trigger 'callback' or 'errback' if the iq response is 'terminate' type. #277

Open
Williammer opened this issue Dec 18, 2017 · 3 comments

Comments

@Williammer
Copy link

Williammer commented Dec 18, 2017

We are sending an IQ stanza with sendIQ API. And if the response is 'terminate' type, the 'callback' or 'errback' specified for the sendIQ won't get triggered. And the timeout specified for sendIQ won't trigger the 'errback' either.

We'll have to listen to the status change event to handle this case, and sendIQ is supposed to trigger either the 'callback' or 'errback' when received the 'terminate' type response, in order to mark an end to this sendIQ action.

@jcbrand
Copy link
Contributor

jcbrand commented Dec 18, 2017

AFAIK, there is no "terminate" type for IQ stanzas, so you're probably getting a "terminate" signal in some other stanza type, right?

If so, it makes sense that the callbacks don't get called, since there was never a response.

Considering the timeout, I suspect that doesn't get triggered because after the "terminate" signal has been received, Strophe.js starts tearing down everything.

Perhaps that can be fixed so that the timeout gets called immediately once "terminate" is received.

@Williammer
Copy link
Author

@jcbrand , thanks for the response. And it'll be great that the timeout gets triggered immediately when received "terminate" signal.

@jcbrand
Copy link
Contributor

jcbrand commented Dec 20, 2017

I don't currently have time to look into this, since it's an issue in your setup/stack, perhaps you could take a stab at implementing such a change and making a pull request?

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

2 participants