()
| 285 | } |
| 286 | |
| 287 | func (c *Client) commandClient() (*redis.Client, error) { |
| 288 | if errEnsure := c.ensureClients(); errEnsure != nil { |
| 289 | return nil, errEnsure |
| 290 | } |
| 291 | c.mu.Lock() |
| 292 | cmd := c.cmd |
| 293 | c.mu.Unlock() |
| 294 | if cmd == nil { |
| 295 | return nil, ErrNotConnected |
| 296 | } |
| 297 | return cmd, nil |
| 298 | } |
| 299 | |
| 300 | func (c *Client) subscriptionClient() (*redis.Client, error) { |
| 301 | if errEnsure := c.ensureClients(); errEnsure != nil { |
no test coverage detected