Skip to content

Commit

Permalink
Merge pull request #223 from jaredwray/fixing-listener-memory-leak---…
Browse files Browse the repository at this point in the history
…issue-#222

fixing listener memory leak - issue #222
  • Loading branch information
jaredwray committed Feb 2, 2023
2 parents 39cd197 + 9a448c6 commit 1b38d5a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Expand Up @@ -221,6 +221,7 @@ class CacheableRequest {
const cachek = this.cache;
cachek.once('error', errorHandler);
ee.on('error', () => cachek.removeListener('error', errorHandler));
ee.on('response', () => cachek.removeListener('error', errorHandler));
}

try {
Expand Down

0 comments on commit 1b38d5a

Please sign in to comment.