graphql-ws
6.4.1 · 15 Oct 2026MIT10.6M / weekRepositoryHomepagenpmAtom feed
6.4.1 is the newest release of 6.x.
In short
1 fixed
Release note
Patch Changes
Disposing of a client event listener twice no longer removes an unrelated listener
The 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.