mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Merge pull request #233 from Freeaqingme/master
Bugfix: pubsub/psubscribe should register a pattern rather than channel
This commit is contained in:
@ -74,7 +74,7 @@ func (c *PubSub) Subscribe(channels ...string) error {
|
|||||||
func (c *PubSub) PSubscribe(patterns ...string) error {
|
func (c *PubSub) PSubscribe(patterns ...string) error {
|
||||||
err := c.subscribe("PSUBSCRIBE", patterns...)
|
err := c.subscribe("PSUBSCRIBE", patterns...)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
c.channels = append(c.channels, patterns...)
|
c.patterns = append(c.patterns, patterns...)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user