fix(all): fix redis subscrible wrong channel

fix redis subscrible wrong channel

Closes #222
This commit is contained in:
yaziming
2019-09-10 12:55:14 +08:00
parent 07cd8fb01a
commit f36e2416c5

View File

@@ -19,7 +19,7 @@ func (r *Redis) Close() {
}
func (r *Redis) subscribe(ctx context.Context, consume ConsumeFunc, channel ...string) error {
psc := redis.PubSubConn{Conn: r.pool.Get()}
if err := psc.Subscribe(redis.Args{}.AddFlat(channel)); err != nil {
if err := psc.Subscribe(redis.Args{}.AddFlat(channel)...); err != nil {
return err
}
done := make(chan error, 1)