ctavan/cluster — comment on commit d94b91d13c3ac565ab018bc58c8bb8682e962299
File:  line 0
By ctavan:

```javascript
var cluster = require('cluster');

var proc = cluster('app.js').listen(3000);

if (proc.isWorker) {
proc.on('worker closing', function() {
console.log('closing worker now');

var server = this.server;

// Increase connection count, so cluster waits before shutting
// down this worker
server.connections++;

// Perform cleanup
cleanupStuff(function() {
server.connections--;
});
});
}
```