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

Need auto-reconnect in sail.strophe.js to fix "improper-addressing" error #3

Open
zuk opened this issue Oct 18, 2011 · 1 comment
Open
Assignees
Labels

Comments

@zuk
Copy link
Contributor

zuk commented Oct 18, 2011

Seeing these errors occasionally:

FAILED TO CONNECT TO XMPP SERVER AS [email protected] BECAUSE: improper-addressing (connect_connfail)

Seems to happen when the tablet/client momentarily looses internet connectivity. Fix might be to catch this error and try to automatically reconnect.

@ghost ghost assigned zuk Oct 18, 2011
@zuk
Copy link
Contributor Author

zuk commented Oct 20, 2011

Turns out that this isn't going to be easy.

educoder/sail.js@49210a5 is an attempt at implementing auto-reconnect, but I'm not sure it works. Strophe already does a bunch of magic to buffer messages until they can be sent out, and it looks like it may already be doing its own auto-reconnect.

In any case the improper-addressing error seems to be generated by the server once the client has been offline too long. I tried increasing mod_http_bind's max_inactivity from 20 seconds to 60 seconds, and I'm hoping this will make the server more tolerant. Making the timeout any longer is problematic because Strophe has it's own built-in 66 second timeout... we can extend this too, but that might lead to yet other problems and necessary adjustments.

Long term I wonder if the solution will be a switch from BOSH to WebSockets. In theory we should get simpler, more reliable connectivity with WebSockets, but not sure how soon that will happen.

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

No branches or pull requests

1 participant