Skip to content

Commit 45c70b0

Browse files
JacksonTiandanbev
authored andcommitted
net: use connect() instead of connect.call()
Use socket.connect() directly. PR-URL: #23289 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Thomas Watson <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent d2de829 commit 45c70b0

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
@@ -152,7 +152,7 @@ function connect(...args) {
152152
socket.setTimeout(options.timeout);
153153
}
154154

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

158158

0 commit comments

Comments
 (0)