diff --git a/README.md b/README.md index 8b7170e..bdce6cb 100644 --- a/README.md +++ b/README.md @@ -429,6 +429,9 @@ as well: `--debug`, `--pretty`, `--socketTimeout 5000`, etc. Changelog --- +### 2.0.7 +* Prevent tcp socket errors from dumping straight to console + ### 2.0.6 * Added support for host domains requiring Punycode encoding (special characters) diff --git a/package.json b/package.json index 11dd5fd..8223886 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ ], "main": "lib/index.js", "author": "Michael Morrison", - "version": "2.0.6", + "version": "2.0.7", "repository": { "type": "git", "url": "https://github.com/sonicsnes/node-gamedig.git" diff --git a/protocols/core.js b/protocols/core.js index e301296..c0e4708 100644 --- a/protocols/core.js +++ b/protocols/core.js @@ -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;