Merge pull request #54 from Dahlgren/bugfix/spawn-process-error

Catch errors while spawning processes and log to console
This commit is contained in:
Björn Dahlgren 2017-04-01 12:54:30 +02:00 committed by GitHub
commit 79d6f2409d

View File

@ -158,6 +158,10 @@ Server.prototype.start = function() {
self.emit('state');
});
instance.on('error', function (err) {
console.log(err);
});
this.pid = instance.pid;
this.instance = instance;
this.queryStatusInterval = setInterval(function () {
@ -190,6 +194,10 @@ Server.prototype.start = function() {
self.headlessInstance = null;
});
headlessInstance.on('error', function (err) {
console.log(err);
});
self.headlessInstance = headlessInstance;
}