fulmine.js 5.16.0 → 5.17.0
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.
- package/package.json +2 -2
- package/src/response.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fulmine.js",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.17.0",
|
|
4
4
|
"description": "Drop-in Express 5 replacement on uWebSockets.js. Your existing middleware keeps working.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"test": "node tests/index.js",
|
|
23
|
-
"test:unit": "node --test --test-timeout=120000 \"tests/unit/*.test.js\"",
|
|
23
|
+
"test:unit": "node --expose-gc --test --test-timeout=120000 \"tests/unit/*.test.js\"",
|
|
24
24
|
"test:types": "tsd --files tests/types/*.test-d.ts",
|
|
25
25
|
"test:express": "node tools/express-suite.js",
|
|
26
26
|
"fuzz": "node tools/fuzz.js",
|
package/src/response.js
CHANGED
|
@@ -388,6 +388,11 @@ module.exports = class Response extends LazyWritable {
|
|
|
388
388
|
this.finished = true;
|
|
389
389
|
this.#socket?.emit("close");
|
|
390
390
|
});
|
|
391
|
+
// this ends the response without emitting 'close' on it, so the cleanup riding that
|
|
392
|
+
// listener never runs and the response stays linked in the app's pending list, holding
|
|
393
|
+
// its request and whatever body was read. close()'s drain sweeps it by the flag, but a
|
|
394
|
+
// server that is never closed kept every one of them
|
|
395
|
+
this._unlinkPending();
|
|
391
396
|
}
|
|
392
397
|
|
|
393
398
|
/**
|