-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
auto_reconnect does not work as expected #333
Comments
Related: #330 |
I don't know if it's so simple as that a presence is not sent, I think the problem is more that the strophe connection is not properly torn down. I'm not sure what the solution is, I'd have to investigate more deeply to get an idea of what the issue is. |
@gpadbidri Can you please see whether reconnecting now works for you? You'll need to specify |
I'm assuming it's fixed now. |
@jcbrand : I have exposed a prebind_url which returns me the JID, SID and RID (Incrememnted by 1)in response...I have also set auto_reconnect:true in my converse.initializ call...But, seems like the connection is established, but the Contacts Panel does NOT get refreshed, meaning :
if ((typeof reconnect !== 'undefined') && (reconnect)) {
converse.log(status === Strophe.Status.CONNECTED ? 'Reconnected' : 'Reattached');
converse.onReconnected();
} else {
converse.log(status === Strophe.Status.CONNECTED ? 'Connected' : 'Attached');
converse.onConnected();
}
NOTE : Ideally, the IF Part should have gotten called as it is reconnect after Step #2 Can you help me figure out what could have gone wrong ? Thanks ! |
Please try to figure out why the first part of the |
It is ‘undefined’…this.onConnect is invoked from StartNewBOSHSession where we are NOT setting any value for reconnect parameter. Also, even if I do some code hack (likesetting a GLOBAL Flag demoFlag = true;) in the onSucess of startNewBoshSession and check it within the onConnect as follows : if (demoFlag === true || ((typeof reconnect !== 'undefined') && (reconnect))) {
In the above case,the IF part is executed meaning reconnect happens, but still the issue remains. From: JC Brand [mailto:notifications@github.com] Please try to figure out why the first part of the if statement didn't execute. What is the value of reconnect? That appears to be a bug. — |
@jcbrand : Any updates on this issue ? |
@jcbrand : Also, setting "auto_reconnect" to true, should ideally keep polling the XMPP Server until the XMPP Server is UP ? I am not sure if the current code does that ? It just fires the reconnect event once and if the PREBIND URL was unable to send the JID SID and RID in response, it will delete the connection.... |
Yes, it's clear the reconnection can still be improved. |
Please create 2 new tickets. One for the status of contacts not being shown properly after reconnecting (you say they were wrongly shown as "online") and one for polling the server when reconnecting. |
Hi JC,
I have the
auto_reconnect : true
in myconverse.initialize
However, it fails when reconnect actually happens...Following is the Test Case :
2.Stay idle for some time...We see the
this.onConnect => converse.reconnect();
gets invoked.Where in the converse code is the right place to send the presence ? Ideally, reconnecting should also keep the User State as Online, right ?
NOTE : I have not modified any code that can impact this behavior.
The text was updated successfully, but these errors were encountered: