docs: update end event description to reference close() and destroy() - #3332
Merged
nkaradzhov merged 1 commit intoJul 13, 2026
Merged
Conversation
nkaradzhov
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The events table describes the
endevent as fired "via.disconnect()", butdisconnect()was deprecated in v5 in favour ofdestroy()(andquit()in favour ofclose()), as documented in the Disconnecting section of the same README.Tracing the source,
endis emitted fromdestroySocket()inpackages/client/lib/client/socket.ts, which is reached by bothclose()anddestroy().disconnect()only triggers it indirectly, by forwarding todestroy().This updates the event description to reference the current methods rather than the deprecated alias.
Checklist
npm testpass with this change (including linting)? — README-only change;npm run lintreports no JS/TS files to lint. (Note:npm run build:tests-toolsfrom CONTRIBUTING.md doesn't exist as a script.)Note
Low Risk
README-only documentation change with no runtime or API behavior changes.
Overview
Updates the Events table in the README so the
endrow matches the v5 disconnect API.The
endevent 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/destroyreplacequit/disconnect) and withdestroySocket()in the client, which emitsendon those paths.Reviewed by Cursor Bugbot for commit 6a15d26. Bugbot is set up for automated code reviews on this repo. Configure here.