You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into an issue with my openfire server where sometimes (1 in 2 to 1 in 30 attempts) during the authentication flow, I get an ack from the server instead of a proper response. Because the long polls are not yet set up in the authentication flow, no handlers get called and strophe pretty much just does nothing.
I wrote a fix in the _dataRecv handler to handle this case by re-sending a request to the server
// if server returns an ack during the auth flow, reconnect for response
if (elem.getAttribute("ack") && !this.authenticated) {
this.rid = elem.getAttribute("ack");
var body = this._buildBody();
var newReq = new Strophe.Request(body.tree(),
this._onRequestStateChange.bind(this).prependArg(this._dataRecv.bind(this)), elem.getAttribute("ack"));
this._requests.push(newReq);
this._processRequest(this._requests.length - 1);
}
I didn't handle it, but if the server sends some other unexpected response, then strophe will still stall out without any error condition. There should be some sort of error handling for unexpected server responses during the authentication flow, before the long polls are initialized.
The text was updated successfully, but these errors were encountered:
I've run into an issue with my openfire server where sometimes (1 in 2 to 1 in 30 attempts) during the authentication flow, I get an ack from the server instead of a proper response. Because the long polls are not yet set up in the authentication flow, no handlers get called and strophe pretty much just does nothing.
I wrote a fix in the _dataRecv handler to handle this case by re-sending a request to the server
I didn't handle it, but if the server sends some other unexpected response, then strophe will still stall out without any error condition. There should be some sort of error handling for unexpected server responses during the authentication flow, before the long polls are initialized.
The text was updated successfully, but these errors were encountered: