rabbitmq-stream-go-client
rabbitmq-stream-go-client copied to clipboard
Close channels inside a `Once` and don't set channels to `nil`
https://github.com/rabbitmq/rabbitmq-stream-go-client/blob/80ec3cc3d49b88fb3f11393daa403055cba269c5/pkg/raw/client.go#L684-L697
Setting the channel to nil
comes at a risk of blocking infinitely if any receiver attempts to receive.
Receiving from a nil channel blocks forever.
https://go.dev/ref/spec#Receive_operator
It probably does not block inside the smart layer, but this is an unnecesary risk, when there's another option available to achieve idempotent shutdown()