Do synchronous Strophe disconnect in order to increase the chances of the delivery of the unavailable presence to the XMPP server.

This commit is contained in:
Lyubomir Marinov 2016-01-25 17:01:12 -06:00
parent e0ba89e001
commit a0becb918e
2 changed files with 5522 additions and 5492 deletions

View File

@ -81,9 +81,14 @@ function sendEmail (email) {
/**
* Leave the conference and close connection.
*/
function unload () {
room.leave();
connection.disconnect();
function unload (ev) {
// XXX On beforeunload and unload, there is precious little time to send
// requests. Since we are really interested in letting the XMPP server know
// that the local peer is going away (so that the XMPP server may notify the
// remote peers) and disconnecting should achieve that, do not bother with
// leaving the room.
//room.leave();
connection.disconnect(ev);
}
/**

File diff suppressed because it is too large Load Diff