()
| 779 | } |
| 780 | |
| 781 | func (client *client) resurrectDeadBrokers() { |
| 782 | client.lock.Lock() |
| 783 | defer client.lock.Unlock() |
| 784 | |
| 785 | Logger.Printf("client/brokers resurrecting %d dead seed brokers", len(client.deadSeeds)) |
| 786 | client.seedBrokers = append(client.seedBrokers, client.deadSeeds...) |
| 787 | client.deadSeeds = nil |
| 788 | } |
| 789 | |
| 790 | // LeastLoadedBroker returns the broker with the least pending requests. |
| 791 | // Firstly, choose the broker from cached broker list. If the broker list is empty, choose from seed brokers. |
no test coverage detected