aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/friends.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/friends.js')
-rw-r--r--server/lib/friends.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/friends.js b/server/lib/friends.js
index f634aedbb..1e8037c37 100644
--- a/server/lib/friends.js
+++ b/server/lib/friends.js
@@ -203,7 +203,7 @@ function computeForeignPodsList (host, podsScore, callback) {
203 else podsScore[foreignPodHost] = 1 203 else podsScore[foreignPodHost] = 1
204 }) 204 })
205 205
206 callback() 206 return callback()
207 }) 207 })
208} 208}
209 209
@@ -212,6 +212,7 @@ function computeWinningPods (hosts, podsScore) {
212 // Only add a pod if it exists in more than a half base pods 212 // Only add a pod if it exists in more than a half base pods
213 const podsList = [] 213 const podsList = []
214 const baseScore = hosts.length / 2 214 const baseScore = hosts.length / 2
215
215 Object.keys(podsScore).forEach(function (podHost) { 216 Object.keys(podsScore).forEach(function (podHost) {
216 // If the pod is not me and with a good score we add it 217 // If the pod is not me and with a good score we add it
217 if (isMe(podHost) === false && podsScore[podHost] > baseScore) { 218 if (isMe(podHost) === false && podsScore[podHost] > baseScore) {