mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-18 09:35:50 +00:00
Prevent tcp socket errors from dumping straight to console (2.0.7)
This commit is contained in:
parent
05619469b7
commit
9a536b160e
3 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue