Skip to content

Commit

Permalink
fixing listener memory leak - issue #222
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredwray committed Feb 1, 2023
1 parent 39cd197 commit 9a448c6
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 9a448c6

Please sign in to comment.