Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix leak of listeners for process #432

Closed

Conversation

tricknotes
Copy link
Contributor

When I run mocha --watch and after 11th running, the following message was
shown:

(node) warning: possible EventEmitter memory leak detected. 11 listeners
added. Use emitter.setMaxListeners() to increase limit.

It seems that 'uncaughtException' listener is not released.
Because, the listener to be released is different from listened one.

To fix this issue, I gave the same listener to process.on and
process.removeListener.

When I run `mocha --watch` and after 11th running, the following message was
shown:

```
(node) warning: possible EventEmitter memory leak detected. 11 listeners
added. Use emitter.setMaxListeners() to increase limit.
```

It seems that 'uncaughtException' listener is not released.
Because, the listener to be released is different from listened one.

To fix this issue, I gave the same listener to `process.on` and
`process.removeListener`.
@tj
Copy link
Contributor

tj commented Jun 17, 2012

This issue has been inactive for over 2 months so I'm closing it. If you think it's still an issue re-open. - tjbot

@tj tj closed this Jun 17, 2012
@tricknotes
Copy link
Contributor Author

It does not fix yet.
The event listener 'uncaughtException' is not released when test has run.

@tj
Copy link
Contributor

tj commented Jun 17, 2012

pushed the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants