1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Finalise the join in a network and add the ability to quit it

This commit is contained in:
Chocobozzz 2016-01-23 18:31:58 +01:00
parent 2cc8ebf134
commit 45239549bf
14 changed files with 444 additions and 101 deletions

View file

@ -56,7 +56,7 @@
utils.makeMultipleRetryRequest = function (all_data, pods, callbackEach, callback) {
if (!callback) {
callback = callbackEach
callbackEach = function () {}
callbackEach = null
}
var url = http + '://' + host + ':' + port
@ -71,9 +71,13 @@
// Make a request for each pod
async.each(pods, function (pod, callback_each_async) {
function callbackEachRetryRequest (err, response, body, url, pod) {
callbackEach(err, response, body, url, pod, function () {
if (callbackEach !== null) {
callbackEach(err, response, body, url, pod, function () {
callback_each_async()
})
} else {
callback_each_async()
})
}
}
var params = {