diff --git a/index.js b/index.js index e6f6dc9..fd64cbc 100644 --- a/index.js +++ b/index.js @@ -182,6 +182,11 @@ function createFastCGIHandler(options) { if (typeof socket !== "undefined") { socket.removeListener("data", fastCGISocketHandler); 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 protocolStatus = processedPacket.content.readUInt8(4); diff --git a/mod.info b/mod.info index c892c85..299f4de 100755 --- a/mod.info +++ b/mod.info @@ -1,4 +1,4 @@ { "name": "GreenRhombus FastCGI client for SVR.JS", - "version": "1.0.5" + "version": "1.0.6" }