Permalink
Browse files

v0.2.3

  • Loading branch information...
1 parent e07cd6a commit 6e54e720d9314aa96e58bc585539ce9b86c5e1f1 Gabriel Llamas committed Mar 15, 2013
Showing with 16 additions and 7 deletions.
  1. +3 −0 CHANGES
  2. +1 −1 README.md
  3. +2 −2 examples/cluster.js
  4. +9 −3 lib/grace.js
  5. +1 −1 package.json
View
@@ -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.
View
@@ -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.
View
@@ -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){
View
@@ -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 ();
View
@@ -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"],

0 comments on commit 6e54e72

Please sign in to comment.