~rogpeppe/+junk/jujud-debug

« back to all changes in this revision

Viewing changes to cmd/jujud/agent.go

  • Committer: Roger Peppe
  • Date: 2013-01-09 12:24:46 UTC
  • Revision ID: roger.peppe@canonical.com-20130109122446-mdfxwt6hgzyg6c5b
fix

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
 
181
181
func RunLoop(c *AgentConf, a Agent) error {
182
182
        atomb := a.Tomb()
183
 
        for atomb.Err() == tomb.ErrStillAlive {
 
183
        for {
184
184
                log.Printf("cmd/jujud: agent starting")
185
185
                err := runOnce(c, a)
186
186
                if ug, ok := err.(*UpgradeReadyError); ok {
204
204
                case <-time.After(retryDelay):
205
205
                        log.Printf("cmd/jujud: rerunning machiner")
206
206
                }
 
207
                if atomb.Err() != tomb.ErrStillAlive {
 
208
                        break
 
209
                }
207
210
        }
208
211
        return atomb.Err()
209
212
}