Update to GreenRhombus 1.0.2
This commit is contained in:
parent
da71e8d868
commit
6b2e88c6ab
2 changed files with 10 additions and 4 deletions
12
index.js
12
index.js
|
@ -168,7 +168,11 @@ function createFastCGIHandler(options) {
|
|||
if (processedPacket.type == STDOUT) {
|
||||
if(processedPacket.content.length > 0) emulatedStdout.push(processedPacket.content);
|
||||
} else if (processedPacket.type == STDERR) {
|
||||
if(processedPacket.content.length > 0) emulatedStderr.push(processedPacket.content);
|
||||
try {
|
||||
if(processedPacket.content.length > 0) emulatedStderr.push(processedPacket.content);
|
||||
} catch (err) {
|
||||
//STDERR will be lost anyway...
|
||||
}
|
||||
} else if (processedPacket.type == END_REQUEST && processedPacket.content.length > 5) {
|
||||
if (typeof socket !== "undefined") socket.removeListener("data", fastCGISocketHandler);
|
||||
var appStatus = processedPacket.content.readUInt32BE(0);
|
||||
|
@ -185,22 +189,24 @@ function createFastCGIHandler(options) {
|
|||
err = new Error("Multiplexed connections not supported by the FastCGI application");
|
||||
}
|
||||
emulatedStdout.push(null);
|
||||
emulatedStderr.push(null);
|
||||
if (emulatedStdout._readableState && emulatedStdout._readableState.length > 0 && emulatedStdout._readableState.flowing !== null) {
|
||||
emulatedStdout.on("end", function() {
|
||||
emulatedStderr.push(null);
|
||||
eventEmitter.emit("error", err);
|
||||
});
|
||||
} else {
|
||||
emulatedStderr.push(null);
|
||||
eventEmitter.emit("error", err);
|
||||
}
|
||||
} else {
|
||||
emulatedStdout.push(null);
|
||||
emulatedStderr.push(null);
|
||||
if (emulatedStdout._readableState && emulatedStdout._readableState.length > 0 && emulatedStdout._readableState.flowing !== null) {
|
||||
emulatedStdout.on("end", function() {
|
||||
emulatedStderr.push(null);
|
||||
eventEmitter.emit("exit", appStatus, null);
|
||||
});
|
||||
} else {
|
||||
emulatedStderr.push(null);
|
||||
eventEmitter.emit("exit", appStatus, null);
|
||||
}
|
||||
}
|
||||
|
|
2
mod.info
2
mod.info
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"name": "GreenRhombus FastCGI client for SVR.JS",
|
||||
"version": "1.0.1"
|
||||
"version": "1.0.2"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue