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:
parent
ae45c2e132
commit
b38e1cea5f
2 changed files with 7 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
||||||
"port": 80,
|
"port": 80,
|
||||||
"pubport": 80,
|
"pubport": 80,
|
||||||
"page404": "404.html",
|
"page404": "404.html",
|
||||||
"timestamp": 1699810328987,
|
"timestamp": 1699810857032,
|
||||||
"blacklist": [],
|
"blacklist": [],
|
||||||
"nonStandardCodes": [],
|
"nonStandardCodes": [],
|
||||||
"enableCompression": true,
|
"enableCompression": true,
|
||||||
|
@ -102,4 +102,4 @@
|
||||||
"errorPages": [],
|
"errorPages": [],
|
||||||
"useWebRootServerSideScript": true,
|
"useWebRootServerSideScript": true,
|
||||||
"exposeModsInErrorPages": true
|
"exposeModsInErrorPages": true
|
||||||
}
|
}
|
6
svr.js
6
svr.js
|
@ -2798,7 +2798,11 @@ if (!cluster.isPrimary) {
|
||||||
delete table["connection"];
|
delete table["connection"];
|
||||||
delete table["keep-alive"];
|
delete table["keep-alive"];
|
||||||
delete table["upgrade"];
|
delete table["upgrade"];
|
||||||
return res.writeHeadNodeApi(a, table);
|
if(res.stream && res.stream.destroyed) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return res.writeHeadNodeApi(a, table);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
res.setHeader = function (a, b) {
|
res.setHeader = function (a, b) {
|
||||||
|
|
Reference in a new issue