mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
Add support for watch in transactions.
This commit is contained in:
@ -12,15 +12,9 @@ type PubSubClient struct {
|
||||
}
|
||||
|
||||
func newPubSubClient(client *Client) (*PubSubClient, error) {
|
||||
pubSubConn, _, err := client.ConnPool.Get()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client.ConnPool.Remove(pubSubConn)
|
||||
|
||||
c := &PubSubClient{
|
||||
Client: &Client{
|
||||
ConnPool: NewSingleConnPool(pubSubConn),
|
||||
ConnPool: NewSingleConnPool(client.ConnPool),
|
||||
},
|
||||
ch: make(chan *Message),
|
||||
}
|
||||
|
Reference in New Issue
Block a user