mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-02 10:25:21 +00:00
Do not hang if process crash
This commit is contained in:
parent
b9cd0cf74e
commit
b3ed3d0379
@ -29,6 +29,10 @@ class ProcessLauncher {
|
||||
_subscribeToMessages() {
|
||||
const self = this;
|
||||
this.process.on('message', (msg) => {
|
||||
if (msg.error) {
|
||||
self.logger.error(msg.error);
|
||||
process.exit(0);
|
||||
}
|
||||
if (msg.result === constants.process.log) {
|
||||
return self._handleLog(msg);
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
process.on('uncaughtException', function(e){
|
||||
process.send({error: e.stack});
|
||||
});
|
||||
|
||||
const constants = require('../../constants');
|
||||
const Events = require('./eventsWrapper');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user