Let prebinding take precedence over keepalive.
This commit is contained in:
parent
47e9e963fd
commit
f26e709a4b
12
converse.js
12
converse.js
@ -4501,6 +4501,12 @@
|
|||||||
}
|
}
|
||||||
this.connection = new Strophe.Connection(this.bosh_service_url);
|
this.connection = new Strophe.Connection(this.bosh_service_url);
|
||||||
|
|
||||||
|
if (this.prebind) {
|
||||||
|
if ((!this.jid) || (!this.sid) || (!this.rid) || (!this.bosh_service_url)) {
|
||||||
|
throw('If you set prebind=true, you MUST supply JID, RID and SID values');
|
||||||
|
}
|
||||||
|
this.connection.attach(this.jid, this.sid, this.rid, this.onConnect);
|
||||||
|
}
|
||||||
if (this.keepalive) {
|
if (this.keepalive) {
|
||||||
rid = this.session.get('rid');
|
rid = this.session.get('rid');
|
||||||
sid = this.session.get('sid');
|
sid = this.session.get('sid');
|
||||||
@ -4513,12 +4519,6 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.prebind) {
|
|
||||||
if ((!this.jid) || (!this.sid) || (!this.rid) || (!this.bosh_service_url)) {
|
|
||||||
throw('If you set prebind=true, you MUST supply JID, RID and SID values');
|
|
||||||
}
|
|
||||||
this.connection.attach(this.jid, this.sid, this.rid, this.onConnect);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user