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

Unified Diff: remoting/webapp/host_controller.js

Issue 10155020: Unregister host if we fail to start it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/host_controller.js
diff --git a/remoting/webapp/host_controller.js b/remoting/webapp/host_controller.js
index e3ab141a9e83a606f981bcceae9e36820e795f2f..1b7a81118688426d63d5f5ef610bbcb57ba61c16 100644
--- a/remoting/webapp/host_controller.js
+++ b/remoting/webapp/host_controller.js
@@ -138,6 +138,9 @@ remoting.HostController.prototype.start = function(hostPin, callback) {
localHost.status = 'ONLINE';
that.setHost(localHost);
remoting.hostList.addHost(localHost);
+ } else {
+ // Unregister the host if we failed to start it.
+ remoting.HostList.unregisterHostById(newHostId);
}
callback(result);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698