Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mx-connect

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mx-connect - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

33

lib/get-connection.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc