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 Oct 30, 2018
1 parent 4c9d993 commit d13bb2c
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 d13bb2c

Please sign in to comment.