Skip to content

Commit 5c184be

Browse files
committed
Remove redundant log and leave comment in its place
1 parent 2d4252b commit 5c184be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manager.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,8 @@ func (m *Manager) StartBackgroundChecks(ctx context.Context) {
587587
needsRestartCheckInterval = minimalNeedsRestartCheckInterval
588588
}
589589
if needsRestart {
590-
m.logger.Infof("%s restart was requested from app; forcibly restarting now", SubsystemName)
590+
// Do not mark m.agentNeedsRestart and instead Exit immediately; we do not want
591+
// to wait for viam-server to allow a restart as it may be in a bad state.
591592
m.Exit(fmt.Sprintf("A restart of %s was requested from app", SubsystemName))
592593
}
593594
// As with the device agent config check interval, randomly fuzz the interval by

0 commit comments

Comments
 (0)