From e70c9d55db08f6de6ebc925cf492f2ca83d7c328 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 14 Sep 2015 21:45:27 -0700 Subject: [PATCH] apptask: retry for external error as well --- src/apptask.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apptask.js b/src/apptask.js index d364311a0..6e25a0843 100644 --- a/src/apptask.js +++ b/src/apptask.js @@ -433,7 +433,7 @@ function registerSubdomain(app, callback) { debugApp(app, 'Registering subdomain location [%s]', app.location); subdomains.add(record, function (error, changeId) { - if (error && error.reason === SubdomainError.STILL_BUSY) return retryCallback(error); // try again + if (error && (error.reason === SubdomainError.STILL_BUSY || error.reason === SubdomainError.EXTERNAL_ERROR)) return retryCallback(error); // try again retryCallback(null, error || changeId); }); @@ -457,9 +457,9 @@ function unregisterSubdomain(app, location, callback) { debugApp(app, 'Unregistering subdomain: %s', location); subdomains.remove(record, function (error) { - if (error && error.reason === SubdomainError.STILL_BUSY) return retryCallback(error); // try again + if (error && (error.reason === SubdomainError.STILL_BUSY || error.reason === SubdomainError.EXTERNAL_ERROR))return retryCallback(error); // try again - retryCallback(null); + retryCallback(error); }); }, function (error) { if (error) debugApp(app, 'Error unregistering subdomain: %s', error);