mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-14 20:11:03 +00:00
unhandledRejection in app.js
This commit is contained in:
parent
fa8f94ce69
commit
6b365948ab
2 changed files with 3 additions and 3 deletions
3
app.js
3
app.js
|
|
@ -14,3 +14,6 @@ catch(err) {
|
|||
module.exports=mcServer.createMCServer(settings);
|
||||
|
||||
|
||||
process.on('unhandledRejection', err => {
|
||||
console.log(err.stack);
|
||||
});
|
||||
|
|
@ -41,8 +41,5 @@ class MCServer extends EventEmitter {
|
|||
this._server.on('error', error => this.emit('error',error));
|
||||
this._server.on('listening', () => this.emit('listening',this._server.socketServer.address().port));
|
||||
this.emit('asap');
|
||||
|
||||
//process.on('unhandledRejection', err => this.emit('error',err));
|
||||
// TODO better catch all promises: using this make it impossible to run 2 servers in one process
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue