clear the timeout just to be safe

This commit is contained in:
Girish Ramakrishnan
2019-09-23 18:17:05 -07:00
parent 70b9000b0e
commit 4b6ac538ac
+3
View File
@@ -160,6 +160,9 @@ function checkDnsRecords(req, res, next) {
if (!('subdomain' in req.query)) return next(new HttpError(400, 'subdomain is required'));
// some DNS providers like DigitalOcean take a really long time to verify credentials (https://github.com/expressjs/timeout/issues/26)
req.clearTimeout();
domains.checkDnsRecords(req.query.subdomain, req.params.domain, function (error, result) {
if (error && error.reason === DomainsError.NOT_FOUND) return next(new HttpError(404, error.message)); // domain (and not record!) not found
if (error && error.reason === DomainsError.EXTERNAL_ERROR) return next(new HttpError(424, error.message));