Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: remoting/webapp/crd/js/client_session.js

Issue 1101613003: [Webapp Refactor] Reliably cancels a connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ImproveUnittest
Patch Set: Rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/base/js/modal_dialogs.js ('k') | remoting/webapp/crd/js/crd_event_handlers.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/client_session.js
diff --git a/remoting/webapp/crd/js/client_session.js b/remoting/webapp/crd/js/client_session.js
index 6941b420b4a26cb6d61a58fb79fe82ee24c5514c..a51f7a5dd7da3013442122de9aad37d3a71d919a 100644
--- a/remoting/webapp/crd/js/client_session.js
+++ b/remoting/webapp/crd/js/client_session.js
@@ -269,6 +269,8 @@ remoting.ClientSession.prototype.connect = function(host, credentialsProvider) {
*/
remoting.ClientSession.prototype.disconnect = function(error) {
if (this.isFinished()) {
+ // Do not send the session-terminate Iq if disconnect() is already called or
+ // if it is initiated by the host.
return;
}
« no previous file with comments | « remoting/webapp/base/js/modal_dialogs.js ('k') | remoting/webapp/crd/js/crd_event_handlers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698