Skip to content
This repository was archived by the owner on Sep 25, 2020. It is now read-only.

Commit 86701e2

Browse files
committed
Merge pull request #19 from uber/ws-fail-admin-top-on-wrong-addr
add error for when ringpop-admin cannot find any members
2 parents b893cb8 + 75d4c7a commit 86701e2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/cluster.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ Cluster.prototype.fetchStats = function fetchStats(callback) {
175175
}
176176

177177
function onComplete(err, allStats) {
178+
if (allStats.length === 0) {
179+
callback(new Error('Failed to connect to any ringpop members'));
180+
return;
181+
}
178182
self.lastDownloadTime = Date.now() - downloadTime;
179183
self.allStats = allStats;
180184
self.allStats.forEach(function eachStats(stats) {

0 commit comments

Comments
 (0)