streadway / amqp

Go client for AMQP 0.9.1
http://godoc.org/github.com/streadway/amqp
BSD 2-Clause "Simplified" License
4.88k stars 621 forks source link

Consider to send error to close listeners in separate goroutines #450

Open rebbuh opened 4 years ago

rebbuh commented 4 years ago

After a connection or a channel has been closed, consider to send the error to the registered listeners in separate goroutines.

If an unbuffered chan is registered as a listener, it will block the notification of other listeners. In my opinion, this is an unintended side effect, since a developer may not have knowledge of all registered listeners and their corresponding buffers.