Cancel this consumer. This will CLOSE Deliveries() channel
()
| 41 | // |
| 42 | // This will CLOSE Deliveries() channel |
| 43 | func (c *Consumer) Cancel() { |
| 44 | c.m.Lock() |
| 45 | defer c.m.Unlock() |
| 46 | |
| 47 | if !c.dead { |
| 48 | close(c.deliveries) |
| 49 | close(c.stop) |
| 50 | c.dead = true |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | func (c *Consumer) reportErr(err error) bool { |
| 55 | if err != nil { |
no outgoing calls