We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3570c1a commit d79dcecCopy full SHA for d79dcec
redis.go
@@ -991,9 +991,19 @@ func (c *Client) TxPipeline() Pipeliner {
991
func (c *Client) pubSub() *PubSub {
992
pubsub := &PubSub{
993
opt: c.opt,
994
-
995
newConn: func(ctx context.Context, channels []string) (*pool.Conn, error) {
996
- return c.connPool.GetPubSub(ctx)
+ cn, err := c.connPool.GetPubSub(ctx)
+ if err != nil {
997
+ return nil, err
998
+ }
999
+
1000
+ err = c.initConn(ctx, cn)
1001
1002
+ _ = c.connPool.CloseConn(cn)
1003
1004
1005
1006
+ return cn, nil
1007
},
1008
closeConn: c.connPool.CloseConn,
1009
pushProcessor: c.pushProcessor,
0 commit comments