diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 02:32:13 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 02:32:13 +0000 |
commit | 7f040cfc29916965da9af6363c320f6ee97c565d (patch) | |
tree | 6ff580f45884b808c808b48d387b9f5db7ec7b2d /remoting | |
parent | bbb011f6a1b9b2877ab0de8860535bb50b39e6d8 (diff) | |
download | chromium_src-7f040cfc29916965da9af6363c320f6ee97c565d.zip chromium_src-7f040cfc29916965da9af6363c320f6ee97c565d.tar.gz chromium_src-7f040cfc29916965da9af6363c320f6ee97c565d.tar.bz2 |
Don't send a session-terminate in disconnect() if WCS not initialised.
sendIq_() requires that WCS is initialized when it is called, otherwise it will switch the session into the "failed" state. (The state change causes a disconnect() call, which triggers a sendIq_() and the tab locks up.)
Review URL: http://codereview.chromium.org/8427020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/webapp/me2mom/client_session.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/remoting/webapp/me2mom/client_session.js b/remoting/webapp/me2mom/client_session.js index 9ec8b4c..1e8bfe1 100644 --- a/remoting/webapp/me2mom/client_session.js +++ b/remoting/webapp/me2mom/client_session.js @@ -199,22 +199,22 @@ remoting.ClientSession.prototype.removePlugin = function() { remoting.ClientSession.prototype.disconnect = function() { if (remoting.wcs) { remoting.wcs.setOnIq(function(stanza) {}); + this.sendIq_( + '<cli:iq ' + + 'to="' + this.hostJid + '" ' + + 'type="set" ' + + 'id="session-terminate" ' + + 'xmlns:cli="jabber:client">' + + '<jingle ' + + 'xmlns="urn:xmpp:jingle:1" ' + + 'action="session-terminate" ' + + 'initiator="' + this.clientJid + '" ' + + 'sid="' + this.sessionId + '">' + + '<reason><success/></reason>' + + '</jingle>' + + '</cli:iq>'); } this.removePlugin(); - this.sendIq_( - '<cli:iq ' + - 'to="' + this.hostJid + '" ' + - 'type="set" ' + - 'id="session-terminate" ' + - 'xmlns:cli="jabber:client">' + - '<jingle ' + - 'xmlns="urn:xmpp:jingle:1" ' + - 'action="session-terminate" ' + - 'initiator="' + this.clientJid + '" ' + - 'sid="' + this.sessionId + '">' + - '<reason><success/></reason>' + - '</jingle>' + - '</cli:iq>'); }; /** |