Merge pull request #233 from Freeaqingme/master

Bugfix: pubsub/psubscribe should register a pattern rather than channel
This commit is contained in:
Vladimir Mihailenco 2015-12-31 11:17:58 +02:00
commit d226168576
1 changed files with 1 additions and 1 deletions

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
}