diff --git a/CHANGES b/CHANGES index 550f693..453781d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +v0.2.3 (15 Mar 2013) + Deleted new domain error properties in node v0.10. + v0.2.2 (09 Mar 2013) "redirectError()" can be used to redirect directly to the default error handler. diff --git a/README.md b/README.md index d00372f..01285f7 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ It's working pretty well with the provided examples and is actively tested in ed #### Graceful application with domains, cluster, error handling and Express support #### -Version: 0.2.2 +Version: 0.2.3 Provides an event-based mechanism to start and gracefully shutdown a web server. diff --git a/examples/cluster.js b/examples/cluster.js index 5d202af..11203e8 100644 --- a/examples/cluster.js +++ b/examples/cluster.js @@ -117,8 +117,8 @@ app.on ("shutdown", function (cb){ }); app.on ("exit", function (code){ - console.log ((cluster.isMaster ? "MASTER" : "WORKER") + ": bye! (" + code + - ")"); + console.log ((cluster.isMaster ? "MASTER" : "WORKER") + " (" + process.pid + + "): bye! (" + code + ")"); }); app.timeout (1000, function (cb){ diff --git a/lib/grace.js b/lib/grace.js index d76fe19..8478303 100644 --- a/lib/grace.js +++ b/lib/grace.js @@ -50,9 +50,14 @@ var rl; var cleanError = function (error){ if (!(error instanceof Object)) return error; delete error.domain; + //v0.8.x delete error.domain_emitter; delete error.domain_bound; delete error.domain_thrown; + //v0.10.x + delete error.domainEmitter; + delete error.domainBound ; + delete error.domainThrown; return error; }; @@ -357,7 +362,7 @@ Grace.prototype.start = function (){ } }); - //Only read stdin on the master + //On windows read stdin on the master if (WIN && cluster.isMaster){ rl = readLine.createInterface ({ input: process.stdin, @@ -472,8 +477,9 @@ Grace.prototype.shutdown = function (code){ //When shutting down workers this check is needed because the master //can be locked because there are workers listening a long living //connection, so when the workers are killed the master continues - //executing the shutdown listener - //Also is a sanity check to prevent undesirable effects + //executing the shutdown listener and could enter here more than one + //time + //It's also a sanity check to prevent undesirable effects if (forced) return; timer.clear (); diff --git a/package.json b/package.json index 97f08a9..a995919 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grace", - "version": "0.2.2", + "version": "0.2.3", "description": "Graceful application with domains, cluster, error handling and Express support", "keywords": ["graceful", "grace", "shutdown", "restart", "domain", "error", "handler", "uncaught", "exception", "express"],