Commit 212a7a60 authored by Thomas Watson's avatar Thomas Watson Committed by Sam Roberts
Browse files

net: ensure net.connect calls Socket connect

It's important for people who monkey-patch `Socket.prototype.connect`
that it's called by `net.connect` since it's not possible to
monkey-patch `net.connect` directly (as the `connect` function is called
directly by other parts of `lib/net.js` instead of calling the
`exports.connect` function).

Among the actors who monkey-patch `Socket.prototype.connect` are most
APM vendors, the async-listener module and the
continuation-local-storage module.

Related:
- https://github.com/nodejs/node/pull/12342
- https://github.com/nodejs/node/pull/12852

PR-URL: https://github.com/nodejs/node/pull/12861


Reviewed-By: default avatarSam Roberts <vieuxtech@gmail.com>
Reviewed-By: default avatarLuca Maraschi <luca.maraschi@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarJan Krems <jan.krems@gmail.com>
parent 65d62499
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment