mx-connect
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -159,21 +159,18 @@ 'use strict'; | ||
let socket = net.connect( | ||
options, | ||
() => { | ||
clearTimeout(connectTimeout); | ||
if (connected) { | ||
// something already happened, just skip this connection and hope for the best | ||
return socket.end(); | ||
} | ||
connected = true; | ||
// we have a connection! | ||
mx.socket = socket; | ||
mx.localAddress = options.localAddress = socket.localAddress; | ||
mx.localHostname = options.localHostname; | ||
mx.localPort = options.localPort = socket.localPort; | ||
mx.hostname = mx.hostname || socket.remoteAddress; | ||
options.remoteAddress = socket.remoteAddress; | ||
return resolve(mx); | ||
let socket = net.connect(options, () => { | ||
clearTimeout(connectTimeout); | ||
if (connected) { | ||
// something already happened, just skip this connection and hope for the best | ||
return socket.end(); | ||
} | ||
); | ||
connected = true; | ||
// we have a connection! | ||
mx.socket = socket; | ||
mx.localAddress = options.localAddress = socket.localAddress; | ||
mx.localHostname = options.localHostname; | ||
mx.localPort = options.localPort = socket.localPort; | ||
mx.hostname = mx.hostname || socket.remoteAddress; | ||
options.remoteAddress = socket.remoteAddress; | ||
return resolve(mx); | ||
}); | ||
socket.once('error', err => { | ||
@@ -180,0 +177,0 @@ if (err) { |
@@ -84,3 +84,3 @@ 'use strict'; | ||
resolveAddresses.push(resolve4(entry)); | ||
if (!dnsOptions.dnsOptions) { | ||
if (!dnsOptions.ignoreIPv6) { | ||
resolveAddresses.push(resolve6(entry)); | ||
@@ -87,0 +87,0 @@ } |
{ | ||
"name": "mx-connect", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Establish TCP connection to a MX server", | ||
@@ -26,11 +26,11 @@ "main": "lib/mx-connect.js", | ||
"eslint-config-nodemailer": "^1.2.0", | ||
"eslint-config-prettier": "^3.1.0", | ||
"grunt": "^1.0.3", | ||
"grunt-cli": "^1.3.1", | ||
"eslint-config-prettier": "^6.0.0", | ||
"grunt": "^1.0.4", | ||
"grunt-cli": "^1.3.2", | ||
"grunt-contrib-nodeunit": "^2.0.0", | ||
"grunt-eslint": "^21.0.0" | ||
"grunt-eslint": "^22.0.0" | ||
}, | ||
"dependencies": { | ||
"ipaddr.js": "1.8.1" | ||
"ipaddr.js": "1.9.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55138
948
+ Addedipaddr.js@1.9.1(transitive)
- Removedipaddr.js@1.8.1(transitive)
Updatedipaddr.js@1.9.1