diff --git a/lib/TcpConnection.js b/lib/TcpConnection.js index 04774e3..787469c 100644 --- a/lib/TcpConnection.js +++ b/lib/TcpConnection.js @@ -2,7 +2,6 @@ const net = require('net') const backoff = require('backoff') -const tcping = require('tcp-ping') /** * @prop {string} [address] The host address to connect to. Default: `127.0.0.1`. @@ -61,20 +60,11 @@ function TcpConnection (options) { this.connecting = true this.socket = net.createConnection( {host: this.options.address, port: this.options.port}, - () => tcping.probe( - this.options.address, - this.options.port, - (err, result) => { - this.connecting = false - if (err) { - console.error(err.message, null) - if (cb) cb(err) - return - } - this.connected = result - if (cb) cb(null, this.connected) - } - ) + () => { + this.connecting = false + this.connected = true + if (cb) cb(null, this.connected) + } ) addListeners.call(this) } diff --git a/package.json b/package.json index 65f56d7..ed71c59 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "pump": "^1.0.1", "safe-buffer": "^5.0.1", "split2": "^2.0.1", - "tcp-ping": "^0.1.1", "through2": "^2.0.1" } }