mirror of
https://github.com/redis/go-redis.git
synced 2025-08-06 01:35:48 +03:00
Rework ReceiveMessage
This commit is contained in:
@@ -1500,11 +1500,9 @@ func (c *ClusterClient) txPipelineReadQueued(
|
||||
}
|
||||
|
||||
func (c *ClusterClient) pubSub(channels []string) *PubSub {
|
||||
opt := c.opt.clientOptions()
|
||||
|
||||
var node *clusterNode
|
||||
return &PubSub{
|
||||
opt: opt,
|
||||
pubsub := &PubSub{
|
||||
opt: c.opt.clientOptions(),
|
||||
|
||||
newConn: func(channels []string) (*pool.Conn, error) {
|
||||
if node == nil {
|
||||
@@ -1527,6 +1525,8 @@ func (c *ClusterClient) pubSub(channels []string) *PubSub {
|
||||
return node.Client.connPool.CloseConn(cn)
|
||||
},
|
||||
}
|
||||
pubsub.init()
|
||||
return pubsub
|
||||
}
|
||||
|
||||
// Subscribe subscribes the client to the specified channels.
|
||||
|
Reference in New Issue
Block a user