Skip to content

docs: update end event description to reference close() and destroy() - #3332

Merged
nkaradzhov merged 1 commit into
redis:masterfrom
Wnayar:docs/update-end-event-description
Jul 13, 2026
Merged

docs: update end event description to reference close() and destroy()#3332
nkaradzhov merged 1 commit into
redis:masterfrom
Wnayar:docs/update-end-event-description

Conversation

@Wnayar

@Wnayar Wnayar commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Description

The events table describes the end event as fired "via .disconnect()", but disconnect() was deprecated in v5 in favour of destroy() (and quit() in favour of close()), as documented in the Disconnecting section of the same README.

Tracing the source, end is emitted from destroySocket() in packages/client/lib/client/socket.ts, which is reached by both close() and destroy(). disconnect() only triggers it indirectly, by forwarding to destroy().

This updates the event description to reference the current methods rather than the deprecated alias.


Checklist

  • Does npm test pass with this change (including linting)? — README-only change; npm run lint reports no JS/TS files to lint. (Note: npm run build:tests-tools from CONTRIBUTING.md doesn't exist as a script.)
  • Is the new or changed code fully tested? — N/A, no code changed
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)? — this PR is the docs update

Note

Low Risk
README-only documentation change with no runtime or API behavior changes.

Overview
Updates the Events table in the README so the end row matches the v5 disconnect API.

The end event is now described as firing when the connection closes via .close() or .destroy(), replacing the outdated .disconnect() wording. This aligns with the Disconnecting section (close/destroy replace quit/disconnect) and with destroySocket() in the client, which emits end on those paths.

Reviewed by Cursor Bugbot for commit 6a15d26. Bugbot is set up for automated code reviews on this repo. Configure here.

@nkaradzhov
nkaradzhov merged commit 799bc04 into redis:master Jul 13, 2026
3 checks passed
@Wnayar
Wnayar deleted the docs/update-end-event-description branch July 13, 2026 16:04
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.

2 participants