Prevent tcp socket errors from dumping straight to console (2.0.7)

This commit is contained in:
mmorrison 2019-01-20 03:52:40 -06:00
parent 05619469b7
commit 9a536b160e
3 changed files with 7 additions and 1 deletions

View file

@ -179,6 +179,9 @@ class Core extends EventEmitter {
socket = net.connect(port,address);
socket.setNoDelay(true);
// Prevent unhandled 'error' events from dumping straight to console
socket.on('error', () => {});
this.debugLog(log => {
this.debugLog(address+':'+port+" TCP Connecting");
const writeHook = socket.write;