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:
parent
2cc8ebf134
commit
45239549bf
14 changed files with 444 additions and 101 deletions
10
src/utils.js
10
src/utils.js
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue