Use attemptNonPreboundSession for reconnections.
Fixes reconnects for certain usecases not yet covered.
This commit is contained in:
parent
e0d1a32fdb
commit
1fbc7e0f3b
@ -429,23 +429,14 @@
|
|||||||
converse.giveFeedback(__('Attempting to reconnect in 5 seconds'), 'error');
|
converse.giveFeedback(__('Attempting to reconnect in 5 seconds'), 'error');
|
||||||
window.clearTimeout(converse.reconnectTimeout);
|
window.clearTimeout(converse.reconnectTimeout);
|
||||||
converse.reconnectTimeout = window.setTimeout(function () {
|
converse.reconnectTimeout = window.setTimeout(function () {
|
||||||
|
converse.clearSession();
|
||||||
|
converse._tearDown();
|
||||||
if (converse.authentication !== "prebind") {
|
if (converse.authentication !== "prebind") {
|
||||||
this.connection.connect(
|
converse.attemptNonPreboundSession();
|
||||||
this.connection.jid,
|
|
||||||
this.connection.pass,
|
|
||||||
function (status, condition) {
|
|
||||||
this.onConnectStatusChanged(status, condition, true);
|
|
||||||
}.bind(this),
|
|
||||||
this.connection.wait,
|
|
||||||
this.connection.hold,
|
|
||||||
this.connection.route
|
|
||||||
);
|
|
||||||
} else if (converse.prebind_url) {
|
} else if (converse.prebind_url) {
|
||||||
this.clearSession();
|
converse.startNewBOSHSession();
|
||||||
this._tearDown();
|
|
||||||
this.startNewBOSHSession();
|
|
||||||
}
|
}
|
||||||
}.bind(this), 5000);
|
}, 5000);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.onDisconnected = function (condition) {
|
this.onDisconnected = function (condition) {
|
||||||
|
Loading…
Reference in New Issue
Block a user