File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1905,7 +1905,7 @@ added:
19051905-->
19061906
19071907Gets the current default value of the ` autoSelectFamilyAttemptTimeout ` option of [ ` socket.connect(options) ` ] [ ] .
1908- The initial default value is ` 250 ` or the value specified via the command line
1908+ The initial default value is ` 500 ` or the value specified via the command line
19091909option ` --network-family-autoselection-attempt-timeout ` .
19101910
19111911* Returns: {number} The current default value of the ` autoSelectFamilyAttemptTimeout ` option.
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ class EnvironmentOptions : public Options {
155155 int64_t heap_snapshot_near_heap_limit = 0 ;
156156 std::string heap_snapshot_signal;
157157 bool network_family_autoselection = true ;
158- uint64_t network_family_autoselection_attempt_timeout = 250 ;
158+ uint64_t network_family_autoselection_attempt_timeout = 500 ;
159159 uint64_t max_http_header_size = 16 * 1024 ;
160160 bool deprecation = true ;
161161 bool force_async_hooks_checks = true ;
Original file line number Diff line number Diff line change @@ -184,8 +184,9 @@ function isPi() {
184184 }
185185}
186186
187- // When using high concurrency or in the CI we need much more time for each connection attempt
188- net . setDefaultAutoSelectFamilyAttemptTimeout ( platformTimeout ( net . getDefaultAutoSelectFamilyAttemptTimeout ( ) * 10 ) ) ;
187+ // When using high concurrency or in the CI we need much more time for each connection attempt.
188+ // Default 500ms becomes 2500ms for tests.
189+ net . setDefaultAutoSelectFamilyAttemptTimeout ( platformTimeout ( net . getDefaultAutoSelectFamilyAttemptTimeout ( ) * 5 ) ) ;
189190const defaultAutoSelectFamilyAttemptTimeout = net . getDefaultAutoSelectFamilyAttemptTimeout ( ) ;
190191
191192const buildType = process . config . target_defaults ?
Original file line number Diff line number Diff line change @@ -7,4 +7,4 @@ const { platformTimeout } = require('../common');
77const assert = require ( 'assert' ) ;
88const { getDefaultAutoSelectFamilyAttemptTimeout } = require ( 'net' ) ;
99
10- assert . strictEqual ( getDefaultAutoSelectFamilyAttemptTimeout ( ) , platformTimeout ( 123 * 10 ) ) ;
10+ assert . strictEqual ( getDefaultAutoSelectFamilyAttemptTimeout ( ) , platformTimeout ( 123 * 5 ) ) ;
You canβt perform that action at this time.
0 commit comments