From 6eec22a5e51b8ba811da5928f0a2e7569acd3715 Mon Sep 17 00:00:00 2001 From: "Dolf Schimmel (Freeaqingme)" Date: Thu, 31 Dec 2015 00:43:28 +0100 Subject: [PATCH] Bugfix: pubsub/psubscribe should register a pattern rather than channel --- pubsub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubsub.go b/pubsub.go index 3e20fe7..6de231f 100644 --- a/pubsub.go +++ b/pubsub.go @@ -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 }