diff --git a/src/gitee-utils/message.go b/src/gitee-utils/message.go index 35f688b7db7d999ad74f7ecda7f5fff01b7cf082..b7047e10aab4f6cf205f7ed3d9d2b551f34c28b1 100644 --- a/src/gitee-utils/message.go +++ b/src/gitee-utils/message.go @@ -231,13 +231,14 @@ func (c *Consumer) consume(channel *amqp.Channel, id int) { log.Println("[", id, "] Running ...") log.Println("[", id, "] Press CTRL+C to exit ...") + forever := make(chan bool) for msg := range msgs { err := eventHandler(msg) if err != nil { log.Println("something wrong with executor", err) - return } } + <-forever log.Println("[", id, "] Exiting ...") }