mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-17 17:25:19 +01: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
|
@ -429,6 +429,9 @@ as well: `--debug`, `--pretty`, `--socketTimeout 5000`, etc.
|
||||||
Changelog
|
Changelog
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### 2.0.7
|
||||||
|
* Prevent tcp socket errors from dumping straight to console
|
||||||
|
|
||||||
### 2.0.6
|
### 2.0.6
|
||||||
* Added support for host domains requiring Punycode encoding (special characters)
|
* Added support for host domains requiring Punycode encoding (special characters)
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
],
|
],
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"author": "Michael Morrison",
|
"author": "Michael Morrison",
|
||||||
"version": "2.0.6",
|
"version": "2.0.7",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sonicsnes/node-gamedig.git"
|
"url": "https://github.com/sonicsnes/node-gamedig.git"
|
||||||
|
|
|
@ -179,6 +179,9 @@ class Core extends EventEmitter {
|
||||||
socket = net.connect(port,address);
|
socket = net.connect(port,address);
|
||||||
socket.setNoDelay(true);
|
socket.setNoDelay(true);
|
||||||
|
|
||||||
|
// Prevent unhandled 'error' events from dumping straight to console
|
||||||
|
socket.on('error', () => {});
|
||||||
|
|
||||||
this.debugLog(log => {
|
this.debugLog(log => {
|
||||||
this.debugLog(address+':'+port+" TCP Connecting");
|
this.debugLog(address+':'+port+" TCP Connecting");
|
||||||
const writeHook = socket.write;
|
const writeHook = socket.write;
|
||||||
|
|
Loading…
Reference in a new issue