consistent infinite for loop style

This commit is contained in:
Roland Shoemaker 2015-04-08 20:07:57 -07:00
parent e8ac96d68d
commit 93ccd37c82
4 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ func main() {
rai := ra.NewRegistrationAuthorityImpl(auditlogger)
for true {
for {
ch := cmd.AmqpChannel(c.AMQP.Server)
closeChan := ch.NotifyClose(make(chan *amqp.Error, 1))

View File

@ -27,7 +27,7 @@ func main() {
sai, err := sa.NewSQLStorageAuthority(auditlogger, c.SA.DBDriver, c.SA.DBName)
cmd.FailOnError(err, "Failed to create SA impl")
for true {
for {
ch := cmd.AmqpChannel(c.AMQP.Server)
closeChan := ch.NotifyClose(make(chan *amqp.Error, 1))

View File

@ -23,7 +23,7 @@ func main() {
vai := va.NewValidationAuthorityImpl(auditlogger, c.CA.TestMode)
for true {
for {
ch := cmd.AmqpChannel(c.AMQP.Server)
closeChan := ch.NotifyClose(make(chan *amqp.Error, 1))

View File

@ -47,7 +47,7 @@ func main() {
// sit around and reconnect to AMQP if the channel
// drops for some reason and repopulate the wfe object
// with new RA and SA rpc clients.
for true {
for {
for err := range closeChan {
auditlogger.Warning(fmt.Sprintf("AMQP Channel closed, will reconnect in 5 seconds: [%s]", err))
time.Sleep(time.Second*5)