Handle nim-waku process exit & error

This commit is contained in:
Franck Royer 2021-03-25 16:29:35 +11:00
parent ee0c63eba3
commit c491b65edc
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 10 additions and 0 deletions

View File

@ -71,6 +71,16 @@ export class NimWaku {
],
});
this.process.on('exit', (signal) => {
if (signal != 0) {
console.log(`nim-waku process exited with ${signal}`);
}
});
this.process.on('error', (err) => {
console.log(`nim-waku process encountered an error: ${err}`);
});
await this.waitForLog('RPC Server started');
}