1
0
Fork 0
forked from svrjs/svrjs

Fixed crashes due of destroyed HTTP/2 stream (Node.JS bug: https://github.com/nodejs/node/issues/24470)

This commit is contained in:
Dorian Niemiec 2023-11-12 18:41:06 +01:00
parent ae45c2e132
commit b38e1cea5f
2 changed files with 7 additions and 3 deletions

View file

@ -3,7 +3,7 @@
"port": 80,
"pubport": 80,
"page404": "404.html",
"timestamp": 1699810328987,
"timestamp": 1699810857032,
"blacklist": [],
"nonStandardCodes": [],
"enableCompression": true,

4
svr.js
View file

@ -2798,7 +2798,11 @@ if (!cluster.isPrimary) {
delete table["connection"];
delete table["keep-alive"];
delete table["upgrade"];
if(res.stream && res.stream.destroyed) {
return false;
} else {
return res.writeHeadNodeApi(a, table);
}
};
res.setHeader = function (a, b) {