@@ -124,7 +124,7 @@ const isMacOS = process.platform === 'darwin';
|
124 | 124 | const isASan = process.config.variables.asan === 1; |
125 | 125 | const isRiscv64 = process.arch === 'riscv64'; |
126 | 126 | const isDebug = process.features.debug; |
127 | | -const isPi = (() => { |
| 127 | +function isPi() { |
128 | 128 | try { |
129 | 129 | // Normal Raspberry Pi detection is to find the `Raspberry Pi` string in |
130 | 130 | // the contents of `/sys/firmware/devicetree/base/model` but that doesn't |
@@ -136,7 +136,7 @@ const isPi = (() => {
|
136 | 136 | } catch { |
137 | 137 | return false; |
138 | 138 | } |
139 | | -})(); |
| 139 | +} |
140 | 140 | |
141 | 141 | // When using high concurrency or in the CI we need much more time for each connection attempt |
142 | 142 | net.setDefaultAutoSelectFamilyAttemptTimeout(platformTimeout(net.getDefaultAutoSelectFamilyAttemptTimeout() * 10)); |
@@ -256,7 +256,7 @@ function platformTimeout(ms) {
|
256 | 256 | if (exports.isAIX || exports.isIBMi) |
257 | 257 | return multipliers.two * ms; // Default localhost speed is slower on AIX |
258 | 258 | |
259 | | -if (isPi) |
| 259 | +if (isPi()) |
260 | 260 | return multipliers.two * ms; // Raspberry Pi devices |
261 | 261 | |
262 | 262 | if (isRiscv64) { |
|