From 8dd3c55ecf5fe3879a1a9f4d087ca8c18c0436da Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 28 Sep 2018 17:05:53 -0700 Subject: [PATCH] Use async unlink --- src/cert/acme2.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cert/acme2.js b/src/cert/acme2.js index f8c218fdb..39df54305 100644 --- a/src/cert/acme2.js +++ b/src/cert/acme2.js @@ -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) {