Commit aa8ed03dd85b4a5115e9e139b242d551087b3f8a
1 parent
8e7e916f56
Exists in
master
ala kadarnya
Showing 1 changed file with 7 additions and 14 deletions Side-by-side Diff
xmlrpc-server.js
... | ... | @@ -298,7 +298,7 @@ function sendReply(response) { |
298 | 298 | |
299 | 299 | function sendTopUpReport(reverseUrls, params, urlIdx, retry) { |
300 | 300 | if (retry === null || retry === undefined) { |
301 | - retry = 3; | |
301 | + retry = 1; | |
302 | 302 | } |
303 | 303 | |
304 | 304 | if (urlIdx === null || urlIdx === undefined) { |
... | ... | @@ -346,21 +346,14 @@ function sendTopUpReport(reverseUrls, params, urlIdx, retry) { |
346 | 346 | |
347 | 347 | client.methodCall(methodName, [ params ], function (topUpReportError, value) { |
348 | 348 | |
349 | - try { | |
350 | - | |
351 | - if (topUpReportError) { | |
352 | - logger.warn('Error sending topUpReport retrying another url (if available)', {error: topUpReportError}); | |
353 | - sendTopUpReport(reverseUrls, params, ++urlIdx, retry); | |
354 | - return; | |
355 | - } | |
356 | - | |
357 | - logger.verbose("topUpReport ACK", {value: value}); | |
358 | - | |
359 | - } | |
360 | - catch(topUpReportException) { | |
361 | - logger.warn("Exception on sending topUpReport", {e: topUpReportException}); | |
349 | + if (topUpReportError) { | |
350 | + logger.warn('Error sending topUpReport retrying another url (if available)', {error: topUpReportError}); | |
351 | + sendTopUpReport(reverseUrls, params, ++urlIdx, retry); | |
352 | + return; | |
362 | 353 | } |
363 | 354 | |
355 | + logger.verbose("topUpReport ACK", {value: value}); | |
356 | + | |
364 | 357 | }); |
365 | 358 | } |
366 | 359 |