@nxtedition/lib 21.3.9 → 21.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/app.js +5 -0
  2. package/couch.js +2 -1
  3. package/package.json +1 -1
package/app.js CHANGED
@@ -31,6 +31,7 @@ import { json } from 'node:stream/consumers'
31
31
  import { monitorEventLoopDelay } from 'node:perf_hooks'
32
32
  import { LRUCache } from 'lru-cache'
33
33
  import xuid from 'xuid'
34
+ import undici from 'undici'
34
35
 
35
36
  export function makeApp(appConfig, onTerminate) {
36
37
  let ds
@@ -49,6 +50,10 @@ export function makeApp(appConfig, onTerminate) {
49
50
  net.setDefaultAutoSelectFamily(false)
50
51
  }
51
52
 
53
+ if (undici.setGlobalDispatcher) {
54
+ undici.setGlobalDispatcher(new undici.Agent({ connectTimeout: 2e3 }))
55
+ }
56
+
52
57
  // Optimize some Node global defaults.
53
58
 
54
59
  Buffer.poolSize = 128 * 1024
package/couch.js CHANGED
@@ -1059,7 +1059,8 @@ class PromiseOutput {
1059
1059
 
1060
1060
  const defaultDispatcher = new Agent({
1061
1061
  pipelining: 4,
1062
- connections: 32,
1062
+ connections: 8,
1063
+ connectTimeout: 2e3,
1063
1064
  })
1064
1065
 
1065
1066
  export function request(url, opts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "21.3.9",
3
+ "version": "21.3.11",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",