Merge pull request #223 from yaziming/fix-redis-subscrible-failed-problem

fix(backend):  redis subscrible channel name is wrong.
This commit is contained in:
Marvin Zhang
2019-09-10 13:08:05 +08:00
committed by GitHub

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)