Open Zerpet opened 1 year ago
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.
nil
Receiving from a nil channel blocks forever. https://go.dev/ref/spec#Receive_operator
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()
shutdown()
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.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()