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

Use safetyCatch err handlers instead of noop #170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HDegroote
Copy link
Contributor

Note: I could not figure out why the noop-err-listener was removed here:

conn.removeListener('error', noop)
. No noop-error-handler seems to be set in that method, and in hyperdht's connect method it's only set in only one place which seems irrelevant: https://github.com/holepunchto/hyperdht/blob/4e30215fd7e75370516df35abafe174d43b26ac5/lib/connect.js#L411

If we want to be safe, we could remove both a noop and a safetyCatch handler there, although it seems plausible that neither is needed.

For now it's just removing a safetyCatch listener, which should be compat with hyperdht as it's no longer using noop handlers once holepunchto/hyperdht#154 is in

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.

1 participant