~themue/pyjuju/go-state-add-relation

« back to all changes in this revision

Viewing changes to state/ssh.go

Redesign of State.AddRelation() after review, modification of the tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
                        // for a very short time and we don't recognise the
116
116
                        // error, we assume that something unknown is
117
117
                        // going wrong and quit.
118
 
                        if sshErr.unknown && time.Now().Sub(startTime) < 500*time.Millisecond {
 
118
                        if sshErr.unknown && time.Now().Sub(startTime) < 200*time.Millisecond {
119
119
                                if restartCount++; restartCount > 10 {
120
120
                                        proc.stop()
121
121
                                        log.Printf("state: too many ssh errors")