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); |
}; |