Use async unlink

This commit is contained in:
Girish Ramakrishnan
2018-09-28 17:05:53 -07:00
parent 1ee902a541
commit 8dd3c55ecf

View File

@@ -424,7 +424,9 @@ Acme2.prototype.cleanupHttpChallenge = function (hostname, domain, challenge, ca
assert.strictEqual(typeof challenge, 'object');
assert.strictEqual(typeof callback, 'function');
fs.unlinkSync(path.join(paths.ACME_CHALLENGES_DIR, challenge.token), callback);
debug('cleanupHttpChallenge: unlinking %s', path.join(paths.ACME_CHALLENGES_DIR, challenge.token));
fs.unlink(path.join(paths.ACME_CHALLENGES_DIR, challenge.token), callback);
};
function getChallengeSubdomain(hostname, domain) {