From 996b3c5bb1bc6f3a8035293ebc1cba7a854b0bd3 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Wed, 17 Oct 2018 14:27:54 -0700 Subject: [PATCH] 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 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- benchmark/_http-benchmarkers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/_http-benchmarkers.js b/benchmark/_http-benchmarkers.js index 76e02504b27ec1..9079dff3ff83cc 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() {