Fixed FastCGI connections not closing properly, when SVR.JS is running on Bun
This commit is contained in:
parent
3b3a29009b
commit
7c4121c55d
1 changed files with 5 additions and 0 deletions
5
index.js
5
index.js
|
@ -182,6 +182,11 @@ function createFastCGIHandler(options) {
|
||||||
if (typeof socket !== "undefined") {
|
if (typeof socket !== "undefined") {
|
||||||
socket.removeListener("data", fastCGISocketHandler);
|
socket.removeListener("data", fastCGISocketHandler);
|
||||||
processFastCGIPacket = function() {};
|
processFastCGIPacket = function() {};
|
||||||
|
try {
|
||||||
|
socket.end(); //Fixes connection not closing properly in Bun
|
||||||
|
} catch (err) {
|
||||||
|
//It is already closed
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var appStatus = processedPacket.content.readUInt32BE(0);
|
var appStatus = processedPacket.content.readUInt32BE(0);
|
||||||
var protocolStatus = processedPacket.content.readUInt8(4);
|
var protocolStatus = processedPacket.content.readUInt8(4);
|
||||||
|
|
Loading…
Reference in a new issue