File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -116,13 +116,19 @@ added: v0.3.4
116116 Can have the following fields:
117117 * ` keepAlive ` {boolean} Keep sockets around even when there are no
118118 outstanding requests, so they can be used for future requests without
119- having to reestablish a TCP connection. ** Default:** ` false ` .
119+ having to reestablish a TCP connection. Not to be confused with the
120+ ` keep-alive ` value of the ` Connection ` header. The ` Connection: keep-alive `
121+ header is always sent when using an agent except when the ` Connection `
122+ header is explicitly specified or when the ` keepAlive ` and ` maxSockets `
123+ options are respectively set to ` false ` and ` Infinity ` , in which case
124+ ` Connection: close ` will be used. ** Default:** ` false ` .
120125 * ` keepAliveMsecs ` {number} When using the ` keepAlive ` option, specifies
121126 the [ initial delay] ( net.html#net_socket_setkeepalive_enable_initialdelay )
122127 for TCP Keep-Alive packets. Ignored when the
123128 ` keepAlive ` option is ` false ` or ` undefined ` . ** Default:** ` 1000 ` .
124129 * ` maxSockets ` {number} Maximum number of sockets to allow per
125- host. ** Default:** ` Infinity ` .
130+ host. Each request will use a new socket until the maximum is reached.
131+ ** Default:** ` Infinity ` .
126132 * ` maxFreeSockets ` {number} Maximum number of sockets to leave open
127133 in a free state. Only relevant if ` keepAlive ` is set to ` true ` .
128134 ** Default:** ` 256 ` .
You can’t perform that action at this time.
0 commit comments