Skip to content

Commit

Permalink
v0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Llamas committed Mar 15, 2013
1 parent e07cd6a commit 6e54e72
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
3 changes: 3 additions & 0 deletions 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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions examples/cluster.js
Expand Up @@ -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){
Expand Down
12 changes: 9 additions & 3 deletions lib/grace.js
Expand Up @@ -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;
};

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 ();
Expand Down
2 changes: 1 addition & 1 deletion 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"],
Expand Down

0 comments on commit 6e54e72

Please sign in to comment.