Clean up requests on error

This commit is contained in:
retroplasma 2019-01-24 20:57:28 +00:00 committed by GitHub
parent 2b3359fc4b
commit 18981db204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,6 +125,7 @@ module.exports = function init(config) {
DUMP_RAW && fs.writeFileSync(path.join(DUMP_RAW_DIR, `${fn}.raw`), payload);
} catch (ex) {
requests[url].forEach(p => p.reject(ex));
delete requests[url];
throw ex;
}