diff options
author | Ali Ijaz Sheikh <ofrobots@google.com> | 2018-10-17 14:27:54 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-10-21 12:25:13 -0700 |
commit | 996b3c5bb1bc6f3a8035293ebc1cba7a854b0bd3 (patch) | |
tree | 6e3116e82f4833a6ccb869d7594146cde46638fd /benchmark | |
parent | 50c99d87b0d0179f1d286cb5cd296b418e96f210 (diff) | |
download | node-new-996b3c5bb1bc6f3a8035293ebc1cba7a854b0bd3.tar.gz |
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: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/_http-benchmarkers.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmark/_http-benchmarkers.js b/benchmark/_http-benchmarkers.js index 76e02504b2..9079dff3ff 100644 --- a/benchmark/_http-benchmarkers.js +++ b/benchmark/_http-benchmarkers.js @@ -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() { |