Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[minor] Restart process via process.nextTick

  • Loading branch information...
commit 1861dbcb3b4fec60b75b58124b5f9b4c4a23e0a6 1 parent 60ee8f3
@indexzero indexzero authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/forever.js
View
4 lib/forever.js
@@ -47,7 +47,9 @@ Forever.prototype.run = function () {
self.times++;
if (self.options.forever || self.times < self.options.max) {
self.emit('restart', null, self);
- self.run();
+ process.nextTick(function () {
+ self.run();
+ });
}
else {
self.emit('exit', null, self);
Please sign in to comment.
Something went wrong with that request. Please try again.