Skip to content

fix: do not emit "error" events - #7

Closed
darrachequesne wants to merge 1 commit into
mainfrom
fix/silent-errors
Closed

darrachequesne wants to merge 1 commit into
mainfrom
fix/silent-errors

Conversation

@darrachequesne

Copy link
Copy Markdown
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
Copy Markdown
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