Skip to content

fix: do not emit "error" events #7

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

Closed
wants to merge 1 commit into from
Closed

Conversation

darrachequesne
Copy link
Member

Forcing users to handle "error" events is useless since there is no
interesting way to handle them (no retry, for example).

Before:

io.adapter(createAdapter(pool));

poll.on("error", (err) => {
  // client disconnection
});

io.of("/").adapter.on("error", () => {
  // needed so that no exception is thrown
});

After:

io.adapter(createAdapter(pool));

poll.on("error", (err) => {
  // client disconnection
})

Forcing users to handle "error" events is useless since there is no
interesting way to handle them (no retry, for example).

Before:

```js
io.adapter(createAdapter(pool));

poll.on("error", (err) => {
  // client disconnection
});

io.of("/").adapter.on("error", () => {
  // needed so that no exception is thrown
});
```

After:

```js
io.adapter(createAdapter(pool));

poll.on("error", (err) => {
  // client disconnection
})
```
@darrachequesne
Copy link
Member Author

Superseded by ec1b78c.

@darrachequesne darrachequesne deleted the fix/silent-errors branch December 16, 2021 11:39
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