Skip to content

Commit cc230b2

Browse files
committed
fixup: benchmark
1 parent 669781a commit cc230b2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ Refs: https://tools.ietf.org/html/rfc7231#section-5.1.1
402402
### Pipelining
403403

404404
Undici will only use pipelining if configured with a `pipelining` factor
405-
greater than `1`.
405+
greater than `1`. Also it is important to pass `blocking: false` to the
406+
request options to properly pipeline requests.
406407

407408
Undici always assumes that connections are persistent and will immediately
408409
pipeline requests, without checking whether the connection is persistent.

benchmarks/benchmark.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ const superagentAgent = new http.Agent({
8989
const undiciOptions = {
9090
path: '/',
9191
method: 'GET',
92+
blocking: false,
93+
reset: false,
9294
headersTimeout,
9395
bodyTimeout
9496
}

test/client-upgrade.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ test('upgrade wait for empty pipeline', async (t) => {
256256

257257
client.request({
258258
path: '/',
259-
method: 'GET'
259+
method: 'GET',
260+
blocking: false
260261
}, (err) => {
261262
t.ifError(err)
262263
})

0 commit comments

Comments
 (0)