Re: [conversejs] connected flag still true after disconnect
- Jc Brand
- 2014-10-09 @ 13:32
On Wed, Oct 08, 2014 at 03:12:07PM -0400, Justin Stefani wrote:
> When I execute the Strophe disconnect function, I notice that when my
> connect_callback handler is called, it will first go through the
> DISCONNECTING state, then reaches the DISCONNECTED state. If I put a
> breakpoint at the DISCONNECTED state, and I check the state of my converse
> connection, I notice that the connected flag is still set to true. Why is
> that? The session on the xmpp server has obviously disconnected by that
The "connected" property is set to "false" in strophe.js, not in converse.js
and it happens right after the handlers for the DISCONNECTED state are called.
Why it's done after calling the handlers, I don't know. Perhaps there's a good
reason for it. It's been like this for at least 5 years.
You can perhaps file a ticket for it on the strophe.js Github repo.