1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

fix: update ChannelWithSubscriptions to accept options

This commit is contained in:
Vladimir Mihailenco
2022-06-04 16:20:10 +03:00
parent f44b325a6d
commit c98c5f0eeb
3 changed files with 2 additions and 4 deletions

View File

@ -456,9 +456,9 @@ func (c *PubSub) ChannelSize(size int) <-chan *Message {
// reconnections.
//
// ChannelWithSubscriptions can not be used together with Channel or ChannelSize.
func (c *PubSub) ChannelWithSubscriptions(_ context.Context, size int) <-chan interface{} {
func (c *PubSub) ChannelWithSubscriptions(opts ...ChannelOption) <-chan interface{} {
c.chOnce.Do(func() {
c.allCh = newChannel(c, WithChannelSize(size))
c.allCh = newChannel(c, opts...)
c.allCh.initAllChan()
})
if c.allCh == nil {