Index: remoting/host/daemon_process_win.cc |
diff --git a/remoting/host/daemon_process_win.cc b/remoting/host/daemon_process_win.cc |
index 85706d59e31ee213e1c49d64f8f5ffb1de4f75bc..32bf73a0a4a9d6377eb7f0ecf8c7c9bb43d63d55 100644 |
--- a/remoting/host/daemon_process_win.cc |
+++ b/remoting/host/daemon_process_win.cc |
@@ -140,11 +140,17 @@ void DaemonProcessWin::OnChannelConnected(int32 peer_pid) { |
} |
void DaemonProcessWin::OnPermanentError(int exit_code) { |
- // Change the service start type to 'manual' if the host has been deleted |
- // remotely. This way the host will not be started every time the machine |
- // boots until the user re-enable it again. |
- if (exit_code == kInvalidHostIdExitCode) |
+ DCHECK(kMinPermanentErrorExitCode <= exit_code && |
+ exit_code <= kMaxPermanentErrorExitCode); |
+ |
+ // Both kInvalidHostIdExitCode and kInvalidOauthCredentialsExitCode are |
+ // errors then will never go away with the current config. |
+ // Disabling automatic service start until the host is re-enabled and config |
+ // updated. |
+ if (exit_code == kInvalidHostIdExitCode || |
+ exit_code == kInvalidOauthCredentialsExitCode) { |
DisableAutoStart(); |
+ } |
DaemonProcess::OnPermanentError(exit_code); |
} |