@nxtedition/lib 23.3.23 → 23.3.25

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/http.js +1 -1
  2. package/package.json +1 -1
  3. package/trace.js +2 -2
package/http.js CHANGED
@@ -186,7 +186,7 @@ export async function requestMiddleware(ctx, next) {
186
186
 
187
187
  // res.destroyed is not properly set by http2 compat so we need to
188
188
  // also check res.closed.
189
- if (!res.headersSent && !res.destroyed && !res.closed) {
189
+ if (!res.headersSent && !res.destroyed && !res.closed && !req.aborted) {
190
190
  res.statusCode = statusCode
191
191
 
192
192
  for (const name of res.getHeaderNames()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "23.3.23",
3
+ "version": "23.3.25",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
package/trace.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { threadId } from 'node:worker_threads'
2
- import { request, Pool } from '@nxtedition/nxt-undici'
2
+ import { request, Agent } from '@nxtedition/nxt-undici'
3
3
  import fp from 'lodash/fp.js'
4
4
 
5
5
  const maxInt = 2147483647
@@ -26,7 +26,7 @@ export function makeTrace({
26
26
  const flushInterval = setInterval(flushTraces, 10e3)
27
27
 
28
28
  url = Array.isArray(url) ? url[0] : url
29
- const client = new Pool(url, {
29
+ const client = new Agent({
30
30
  keepAliveTimeout: 10 * 60e3,
31
31
  pipelining: 4,
32
32
  connections: 4,