aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.js')
-rw-r--r--src/utils.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/utils.js b/src/utils.js
index 5880c6c90..176648a31 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -56,7 +56,7 @@
56 utils.makeMultipleRetryRequest = function (all_data, pods, callbackEach, callback) { 56 utils.makeMultipleRetryRequest = function (all_data, pods, callbackEach, callback) {
57 if (!callback) { 57 if (!callback) {
58 callback = callbackEach 58 callback = callbackEach
59 callbackEach = function () {} 59 callbackEach = null
60 } 60 }
61 61
62 var url = http + '://' + host + ':' + port 62 var url = http + '://' + host + ':' + port
@@ -71,9 +71,13 @@
71 // Make a request for each pod 71 // Make a request for each pod
72 async.each(pods, function (pod, callback_each_async) { 72 async.each(pods, function (pod, callback_each_async) {
73 function callbackEachRetryRequest (err, response, body, url, pod) { 73 function callbackEachRetryRequest (err, response, body, url, pod) {
74 callbackEach(err, response, body, url, pod, function () { 74 if (callbackEach !== null) {
75 callbackEach(err, response, body, url, pod, function () {
76 callback_each_async()
77 })
78 } else {
75 callback_each_async() 79 callback_each_async()
76 }) 80 }
77 } 81 }
78 82
79 var params = { 83 var params = {