Explain auto_start better

This commit is contained in:
Andrew Stewart 2014-09-08 14:33:07 -07:00
parent 69f066e432
commit 70bd524ebe
1 changed files with 3 additions and 4 deletions

View File

@ -122,10 +122,9 @@ var Robot = module.exports = function Robot(opts) {
var auto_start = Utils.fetch(Config, 'auto_start', true);
if (auto_start) {
setTimeout(function() {
this.start();
}.bind(this), 0);
if (auto_start) {
// run on the next tick, to allow for 'work' event handlers to be set up
setTimeout(this.start, 0);
}
};