#6803fdd82f Thanks @kkhys! - Disposing of a client event listener twice no longer removes an unrelated listener
The unsubscribe function returned by client.on spliced at indexOf(listener) without checking for -1, so removing an already-removed listener would splice(-1, 1) and silently drop the most recently registered listener of the same event. This happens in practice without any double-dispose by the user: emits iterate over a copy of the listeners, so a one-shot internal listener that already unlistened itself during a nested emit (e.g. when client.terminate() is called from within a closed/error listener) is re-invoked from the copy and unlistens again, knocking out registered closed/error listeners.
Configuration
📅Schedule: (UTC)
Branch creation
At any time (no schedule defined)
Automerge
At any time (no schedule defined)
🚦Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕Ignore: Close this PR and you won't be reminded about this update again.
If you want to rebase/retry this PR, check this box
This PR contains the following updates:
| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [graphql-ws](https://the-guild.dev/graphql/ws) ([source](https://github.com/enisdenjo/graphql-ws)) | [`6.1.0` → `6.1.1`](https://renovatebot.com/diffs/npm/graphql-ws/6.1.0/6.1.1) |  |  |
---
### Release Notes
<details>
<summary>enisdenjo/graphql-ws (graphql-ws)</summary>
### [`v6.1.1`](https://github.com/enisdenjo/graphql-ws/blob/HEAD/CHANGELOG.md#611)
[Compare Source](https://github.com/enisdenjo/graphql-ws/compare/v6.1.0...v6.1.1)
##### Patch Changes
- [#​680](https://github.com/enisdenjo/graphql-ws/pull/680) [`3fdd82f`](https://github.com/enisdenjo/graphql-ws/commit/3fdd82fbe064e94ff87eabd3ef8c56ff4901d2f1) Thanks [@​kkhys](https://github.com/kkhys)! - Disposing of a client event listener twice no longer removes an unrelated listener
The unsubscribe function returned by `client.on` spliced at `indexOf(listener)` without checking for `-1`, so removing an already-removed listener would `splice(-1, 1)` and silently drop the most recently registered listener of the same event. This happens in practice without any double-dispose by the user: emits iterate over a copy of the listeners, so a one-shot internal listener that already unlistened itself during a nested emit (e.g. when `client.terminate()` is called from within a `closed`/`error` listener) is re-invoked from the copy and unlistens again, knocking out registered `closed`/`error` listeners.
</details>
---
### Configuration
📅 **Schedule**: (UTC)
- Branch creation
- At any time (no schedule defined)
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTcuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI1Ny4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
6.1.0→6.1.1Release Notes
enisdenjo/graphql-ws (graphql-ws)
v6.1.1Compare Source
Patch Changes
#680
3fdd82fThanks @kkhys! - Disposing of a client event listener twice no longer removes an unrelated listenerThe unsubscribe function returned by
client.onspliced atindexOf(listener)without checking for-1, so removing an already-removed listener wouldsplice(-1, 1)and silently drop the most recently registered listener of the same event. This happens in practice without any double-dispose by the user: emits iterate over a copy of the listeners, so a one-shot internal listener that already unlistened itself during a nested emit (e.g. whenclient.terminate()is called from within aclosed/errorlistener) is re-invoked from the copy and unlistens again, knocking out registeredclosed/errorlisteners.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.