Skip to content

Commit

Permalink
benchmark: coerce PORT to number
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ofrobots authored and MylesBorins committed Nov 29, 2018
1 parent 4315899 commit 60fe7f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/_http-benchmarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const requirementsURL =
'https://github.com/nodejs/node/blob/master/doc/guides/writing-and-running-benchmarks.md#http-benchmark-requirements';

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

class AutocannonBenchmarker {
constructor() {
Expand Down

0 comments on commit 60fe7f1

Please sign in to comment.