Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Potential memory leak #139

Closed
achingbrain opened this issue Jan 29, 2022 · 0 comments · Fixed by #140
Closed

Potential memory leak #139

achingbrain opened this issue Jan 29, 2022 · 0 comments · Fixed by #140

Comments

@achingbrain
Copy link
Member

The trackConn function in the listener stores each maConn in the __connections array on the server, in order to close them when the listener is closed.

close is an async method so there could be an unhandledPromiseRejection here, but that's a separate issue.

It doesn't ever seem to remove them from the array. We should be working out if the MaConn is closed at any point - then we can remove them from the list since it won't be necessary to close them when the listener is stopped.

achingbrain added a commit that referenced this issue Jan 30, 2022
If a socket closes we should remove the connection from the list of
connections we are tracking, otherwise we have a memory leak.

Fixes #139
achingbrain added a commit that referenced this issue Feb 10, 2022
- Converts to typescript
- Only named exports
- No more CJS, only ESM
- Runs tests on all supported environments
- Adds auto-publish
- Adds dependabot

Fixes #139 

BREAKING CHANGE: switch to named exports, ESM only
github-actions bot pushed a commit that referenced this issue Feb 10, 2022
## [1.0.0](v0.16.2...v1.0.0) (2022-02-10)

### ⚠ BREAKING CHANGES

* switch to named exports, ESM only

### Features

* convert to typescript ([#76](#76)) ([#140](#140)) ([c4f6508](c4f6508)), closes [#139](#139)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant