mongodb-core
Advanced tools
Comparing version 3.2.1 to 3.2.2
@@ -5,2 +5,13 @@ # Change Log | ||
<a name="3.2.2"></a> | ||
## [3.2.2](https://github.com/mongodb-js/mongodb-core/compare/v3.2.1...v3.2.2) (2019-03-22) | ||
### Bug Fixes | ||
* do not attempt to auth against an arbiter ([72bb011](https://github.com/mongodb-js/mongodb-core/commit/72bb011)) | ||
* **connection:** do not leak a connection if initial handshak fails ([6cba222](https://github.com/mongodb-js/mongodb-core/commit/6cba222)) | ||
<a name="3.2.1"></a> | ||
@@ -7,0 +18,0 @@ ## [3.2.1](https://github.com/mongodb-js/mongodb-core/compare/v3.2.0...v3.2.1) (2019-03-21) |
@@ -103,3 +103,10 @@ 'use strict'; | ||
function performInitialHandshake(conn, options, callback) { | ||
function performInitialHandshake(conn, options, _callback) { | ||
const callback = function(err, ret) { | ||
if (err && conn) { | ||
conn.destroy(); | ||
} | ||
_callback(err, ret); | ||
}; | ||
let compressors = []; | ||
@@ -159,3 +166,3 @@ if (options.compression && options.compression.compressors) { | ||
const credentials = options.credentials; | ||
if (credentials) { | ||
if (!ismaster.arbiterOnly && credentials) { | ||
credentials.resolveAuthMechanism(ismaster); | ||
@@ -234,3 +241,3 @@ authenticate(conn, credentials, callback); | ||
function makeConnection(family, options, callback) { | ||
function makeConnection(family, options, _callback) { | ||
const useSsl = typeof options.ssl === 'boolean' ? options.ssl : false; | ||
@@ -252,2 +259,9 @@ const keepAlive = typeof options.keepAlive === 'boolean' ? options.keepAlive : true; | ||
let socket; | ||
const callback = function(err, ret) { | ||
if (err && socket) { | ||
socket.destroy(); | ||
} | ||
_callback(err, ret); | ||
}; | ||
try { | ||
@@ -254,0 +268,0 @@ if (useSsl) { |
{ | ||
"name": "mongodb-core", | ||
"version": "3.2.1", | ||
"version": "3.2.2", | ||
"description": "Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
564185
13768