1
0
mirror of https://github.com/redis/go-redis.git synced 2025-04-17 20:17:02 +03:00

Bugfix: pubsub/psubscribe should register a pattern rather than channel

This commit is contained in:
Dolf Schimmel (Freeaqingme) 2015-12-31 00:43:28 +01:00
parent f6d6826d82
commit 6eec22a5e5

View File

@ -74,7 +74,7 @@ func (c *PubSub) Subscribe(channels ...string) error {
func (c *PubSub) PSubscribe(patterns ...string) error {
err := c.subscribe("PSUBSCRIBE", patterns...)
if err == nil {
c.channels = append(c.channels, patterns...)
c.patterns = append(c.patterns, patterns...)
}
return err
}