aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/request.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-10-17 21:38:14 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-10-17 21:38:14 +0200
commitc2ee5ce83a2dac9ed16f1ac3e16bd5eca67eabd1 (patch)
tree2f0bfb4030f532514d38819225e63353115eb330 /server/models/request.js
parent464853031832d39eb42807436b4b714798fcb729 (diff)
downloadPeerTube-c2ee5ce83a2dac9ed16f1ac3e16bd5eca67eabd1.tar.gz
PeerTube-c2ee5ce83a2dac9ed16f1ac3e16bd5eca67eabd1.tar.zst
PeerTube-c2ee5ce83a2dac9ed16f1ac3e16bd5eca67eabd1.zip
Server: wait pod removal when finishing a request
Diffstat (limited to 'server/models/request.js')
-rw-r--r--server/models/request.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/models/request.js b/server/models/request.js
index 2d1c5af15..1a99dd2ea 100644
--- a/server/models/request.js
+++ b/server/models/request.js
@@ -185,14 +185,14 @@ function makeRequests () {
185 if (success === true) { 185 if (success === true) {
186 logger.debug('Removing requests for %s pod.', toPodId, { requestsIds: requestToMake.ids }) 186 logger.debug('Removing requests for %s pod.', toPodId, { requestsIds: requestToMake.ids })
187 187
188 // Remove the pod id of these request ids
189 removePodOf.call(self, requestToMake.ids, toPodId)
190 goodPods.push(toPodId) 188 goodPods.push(toPodId)
189
190 // Remove the pod id of these request ids
191 removePodOf.call(self, requestToMake.ids, toPodId, callbackEach)
191 } else { 192 } else {
192 badPods.push(toPodId) 193 badPods.push(toPodId)
194 callbackEach()
193 } 195 }
194
195 callbackEach()
196 }) 196 })
197 }) 197 })
198 }, function () { 198 }, function () {