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 <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • 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.