Merge pull request #41 from pilwon/patch-3

Go: Changed receive_logs_direct.go to continue listening.
This commit is contained in:
Michael Klishin 2014-08-26 11:49:16 +04:00
commit da74436e9e

View File

@ -67,18 +67,14 @@ func main() {
)
failOnError(err, "Failed to register a consumer")
done := make(chan bool)
forever := make(chan bool)
go func() {
for d := range msgs {
log.Printf(" [x] %s", d.Body)
done <- true
}
}()
log.Printf(" [*] Waiting for logs. To exit press CTRL+C")
<-done
log.Printf("Done")
<-forever
}