Index: remoting/webapp/crd/js/desktop_remoting.js |
diff --git a/remoting/webapp/crd/js/desktop_remoting.js b/remoting/webapp/crd/js/desktop_remoting.js |
index e94b84200fafe8314b74fb8dd2b8e83b339b4431..3d70a65304a95070aaf943f51f0215a7da84b7fa 100644 |
--- a/remoting/webapp/crd/js/desktop_remoting.js |
+++ b/remoting/webapp/crd/js/desktop_remoting.js |
@@ -262,11 +262,8 @@ remoting.DesktopRemoting.prototype.handleDisconnected = function() { |
*/ |
remoting.DesktopRemoting.prototype.handleConnectionFailed = function( |
connector, error) { |
- /** @type {remoting.DesktopRemoting} */ |
var that = this; |
- |
- /** @param {boolean} success */ |
- var onHostListRefresh = function(success) { |
+ var onHostListRefresh = function(/** boolean */ success) { |
if (success) { |
var host = remoting.hostList.getHostForId(connector.getHostId()); |
if (host) { |
@@ -277,9 +274,12 @@ remoting.DesktopRemoting.prototype.handleConnectionFailed = function( |
that.handleError(error); |
}; |
+ var mode = this.app_.getSessionConnector().getConnectionMode(); |
if (error.hasTag(remoting.Error.Tag.HOST_IS_OFFLINE) && |
- that.refreshHostJidIfOffline_) { |
- that.refreshHostJidIfOffline_ = false; |
+ mode === remoting.DesktopConnectedView.Mode.ME2ME && |
+ this.refreshHostJidIfOffline_) { |
+ this.refreshHostJidIfOffline_ = false; |
+ |
// The plugin will be re-created when the host finished refreshing |
remoting.hostList.refresh(onHostListRefresh); |
} else { |