diff options
author | Denys Otrishko <shishugi@gmail.com> | 2020-06-22 19:53:38 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-06-25 00:45:10 +0300 |
commit | 78ca61e2cfda9b1e227b0339831ce7507921bc13 (patch) | |
tree | 35319f3362eb76d40c22afcf0663f38e444ac149 /node.gyp | |
parent | b546a2b469da113b9edb43b61c8e4d854c6f7432 (diff) |
net: check args in net.connect() and socket.connect() calls
Previously Node.js would handle empty `net.connect()` and
`socket.connect()` call as if the user passed empty options object which
doesn't really make sense. This was due to the fact that it uses the
same `normalizeArgs` function as `.listen()` call where such call is
perfectly fine.
This will make it clear what is the problem with such call and how it
can be resolved. It now throws `ERR_MISSING_ARGS` if no arguments were
passed or neither `path` nor `port` is specified.
Fixes: https://github.com/nodejs/node/issues/33930
PR-URL: https://github.com/nodejs/node/pull/34022
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Diffstat (limited to 'node.gyp')
0 files changed, 0 insertions, 0 deletions