()
| 460 | } |
| 461 | |
| 462 | func (c *Client) failoverAfterSubscriptionTimeout() (bool, string) { |
| 463 | if c == nil { |
| 464 | return false, "" |
| 465 | } |
| 466 | c.mu.Lock() |
| 467 | defer c.mu.Unlock() |
| 468 | |
| 469 | if !c.clusterDiscoveryEnabledLocked() { |
| 470 | c.reconnectFailures = 0 |
| 471 | return false, "" |
| 472 | } |
| 473 | c.reconnectFailures = 0 |
| 474 | return c.switchToNextNodeLocked() |
| 475 | } |
| 476 | |
| 477 | func (c *Client) switchToNextNodeLocked() (bool, string) { |
| 478 | currentHost := strings.TrimSpace(c.homeCfg.Host) |
no test coverage detected