mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Server: requests refractoring
This commit is contained in:
@@ -203,7 +203,7 @@ function computeForeignPodsList (host, podsScore, callback) {
|
||||
else podsScore[foreignPodHost] = 1
|
||||
})
|
||||
|
||||
callback()
|
||||
return callback()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -212,6 +212,7 @@ function computeWinningPods (hosts, podsScore) {
|
||||
// Only add a pod if it exists in more than a half base pods
|
||||
const podsList = []
|
||||
const baseScore = hosts.length / 2
|
||||
|
||||
Object.keys(podsScore).forEach(function (podHost) {
|
||||
// If the pod is not me and with a good score we add it
|
||||
if (isMe(podHost) === false && podsScore[podHost] > baseScore) {
|
||||
|
||||
Reference in New Issue
Block a user