File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,9 @@ http.get({
113
113
<!-- YAML
114
114
added: v0.3.4
115
115
changes:
116
+ - version: REPLACEME
117
+ pr-url: https://github.com/nodejs/node/pull/36685
118
+ description: Change the default scheduling from 'fifo' to 'lifo'.
116
119
- version:
117
120
- v14.5.0
118
121
- v12.19.0
@@ -159,7 +162,7 @@ changes:
159
162
In case of a high rate of request per second,
160
163
the ` 'fifo' ` scheduling will maximize the number of open sockets,
161
164
while the ` 'lifo' ` scheduling will keep it as low as possible.
162
- ** Default:** ` 'fifo ' ` .
165
+ ** Default:** ` 'lifo ' ` .
163
166
* ` timeout ` {number} Socket timeout in milliseconds.
164
167
This will set the timeout when the socket is created.
165
168
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ function Agent(options) {
105
105
this . keepAlive = this . options . keepAlive || false ;
106
106
this . maxSockets = this . options . maxSockets || Agent . defaultMaxSockets ;
107
107
this . maxFreeSockets = this . options . maxFreeSockets || 256 ;
108
- this . scheduling = this . options . scheduling || 'fifo ' ;
108
+ this . scheduling = this . options . scheduling || 'lifo ' ;
109
109
this . maxTotalSockets = this . options . maxTotalSockets ;
110
110
this . totalSocketCount = 0 ;
111
111
Original file line number Diff line number Diff line change @@ -56,11 +56,11 @@ function defaultTest() {
56
56
57
57
bulkRequest ( url , agent , ( ports ) => {
58
58
makeRequest ( url , agent , ( port ) => {
59
- assert . strictEqual ( ports [ 0 ] , port ) ;
59
+ assert . strictEqual ( ports [ ports . length - 1 ] , port ) ;
60
60
makeRequest ( url , agent , ( port ) => {
61
- assert . strictEqual ( ports [ 1 ] , port ) ;
61
+ assert . strictEqual ( ports [ ports . length - 1 ] , port ) ;
62
62
makeRequest ( url , agent , ( port ) => {
63
- assert . strictEqual ( ports [ 2 ] , port ) ;
63
+ assert . strictEqual ( ports [ ports . length - 1 ] , port ) ;
64
64
server . close ( ) ;
65
65
agent . destroy ( ) ;
66
66
} ) ;
You can’t perform that action at this time.
0 commit comments