lib: use req.socket over deprecated req.connection by bjohansebas · Pull Request #6705 · expressjs/express

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Comments

Conversation

@bjohansebas

Copy link

Member

req.connection was only deprecated in the documentation, but it’s possible that a runtime deprecation will be added since internally it calls socket, so it’s better to start migrating.

https://nodejs.org/dist/latest/docs/api/deprecations.html#DEP0133

Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>

@bjohansebas bjohansebas requested a review from a team

August 13, 2025 01:57

@bjohansebas bjohansebas merged commit 89f198c into master

Aug 21, 2025

26 checks passed

@bjohansebas bjohansebas deleted the connection branch

August 21, 2025 15:05

@UlisesGascon UlisesGascon mentioned this pull request

Nov 25, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@UlisesGascon UlisesGascon UlisesGascon approved these changes

@Phillip9587 Phillip9587 Phillip9587 approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@bjohansebas @UlisesGascon @Phillip9587