Skip to content

Commit 996b3c5

Browse files
ofrobotsjasnell
authored andcommitted
benchmark: coerce PORT to number
Without this fix net/tcp-raw-c2s.js aborts in environments where PORT is defined. TCPWrap::Connect expects the third arg to be a UInt32. PR-URL: #23721 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 50c99d8 commit 996b3c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: benchmark/_http-benchmarkers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const requirementsURL =
88
'https://github.com/nodejs/node/blob/master/doc/guides/writing-and-running-benchmarks.md#http-benchmark-requirements';
99

1010
// The port used by servers and wrk
11-
exports.PORT = process.env.PORT || 12346;
11+
exports.PORT = Number(process.env.PORT) || 12346;
1212

1313
class AutocannonBenchmarker {
1414
constructor() {

0 commit comments

Comments
 (0)