|
@@ -215,7 +215,11 @@ export class Connection extends Strophe.Connection {
|
|
|
const { api } = _converse;
|
|
|
|
|
|
delete this.reconnecting;
|
|
|
- this.flush(); // Solves problem of returned PubSub BOSH response not received by browser
|
|
|
+ if (this.isType('bosh')) {
|
|
|
+ // Solves problem of returned PubSub BOSH response not received by browser
|
|
|
+ this.flush();
|
|
|
+ }
|
|
|
+
|
|
|
await setUserJID(this.jid);
|
|
|
|
|
|
// Save the current JID in persistent storage so that we can attempt to
|
|
@@ -338,6 +342,9 @@ export class Connection extends Strophe.Connection {
|
|
|
reason === "remote-connection-failed"
|
|
|
) {
|
|
|
return this.finishDisconnection();
|
|
|
+ } else if (this.disconnection_cause === Strophe.Status.CONNFAIL && this.disconnection_reason === 'not-well-formed') {
|
|
|
+ // Don't try to automatically reconnect on a not-well-formed error
|
|
|
+ return this.finishDisconnection();
|
|
|
}
|
|
|
api.connection.reconnect();
|
|
|
} else {
|