mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-06 17:27:54 +08:00
Log uncaught exceptions on the socket server
Reviewed By: @frantic Differential Revision: D2462114
This commit is contained in:
committed by
facebook-github-bot-9
parent
f762a55abd
commit
8f5b2ccbe0
@@ -37,6 +37,11 @@ class SocketServer {
|
||||
});
|
||||
});
|
||||
|
||||
process.on('uncaughtException', (error) => {
|
||||
debug('uncaught error', error);
|
||||
setImmediate(() => process.exit(1));
|
||||
});
|
||||
|
||||
this._numConnections = 0;
|
||||
this._server.on('connection', (sock) => this._handleConnection(sock));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user