Skip to content

Commit a65bb42

Browse files
JacksonTiantargos
authored andcommitted
net: use connect() instead of connect.call()
Use socket.connect() directly. PR-URL: #23289 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Thomas Watson <w@tson.dk> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 62a2c81 commit a65bb42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/net.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function connect(...args) {
151151
socket.setTimeout(options.timeout);
152152
}
153153

154-
return Socket.prototype.connect.call(socket, normalized);
154+
return socket.connect(normalized);
155155
}
156156

157157

0 commit comments

Comments
 (0)