fix unregisterSubdomain loop

This commit is contained in:
Girish Ramakrishnan
2015-10-27 18:53:06 -07:00
parent c96c9175a4
commit 44f8be87f7
+4 -4
View File
@@ -263,12 +263,12 @@ function unregisterSubdomain(app, location, callback) {
debugApp(app, 'Unregistering subdomain: %s', location);
subdomains.remove(record, function (error) {
if (error && (error.reason === SubdomainError.STILL_BUSY || error.reason === SubdomainError.EXTERNAL_ERROR))return retryCallback(error); // try again
if (error && (error.reason === SubdomainError.STILL_BUSY || error.reason === SubdomainError.EXTERNAL_ERROR)) return retryCallback(error); // try again
retryCallback(error);
retryCallback(null, error);
});
}, function (error) {
if (error) debugApp(app, 'Error unregistering subdomain: %s', error);
}, function (error, result) {
if (error || result instanceof Error) return callback(error || result);
updateApp(app, { dnsRecordId: null }, callback);
});