mongodb 3.6.7 → 3.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/HISTORY.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [3.6.8](https://github.com/mongodb/node-mongodb-native/compare/v3.6.7...v3.6.8) (2021-05-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **cmap:** undo flipping of `beforeHandshake` flag for timeout errors ([#2813](https://github.com/mongodb/node-mongodb-native/issues/2813)) ([6e3bab3](https://github.com/mongodb/node-mongodb-native/commit/6e3bab32204ea905ab9b949edccb68556b50d382))
11
+
5
12
  ### [3.6.7](https://github.com/mongodb/node-mongodb-native/compare/v3.6.6...v3.6.7) (2021-05-18)
6
13
 
7
14
 
@@ -122,7 +122,7 @@ class Connection extends EventEmitter {
122
122
  if (issue.isTimeout) {
123
123
  op.cb(
124
124
  new MongoNetworkTimeoutError(`connection ${this.id} to ${this.address} timed out`, {
125
- beforeHandshake: !!this[kIsMaster]
125
+ beforeHandshake: this.ismaster == null
126
126
  })
127
127
  );
128
128
  } else if (issue.isClose) {
package/lib/core/error.js CHANGED
@@ -102,8 +102,8 @@ class MongoNetworkError extends MongoError {
102
102
  super(message);
103
103
  this.name = 'MongoNetworkError';
104
104
 
105
- if (options && options.beforeHandshake === true) {
106
- this[kBeforeHandshake] = true;
105
+ if (options && typeof options.beforeHandshake === 'boolean') {
106
+ this[kBeforeHandshake] = options.beforeHandshake;
107
107
  }
108
108
  }
109
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongodb",
3
- "version": "3.6.7",
3
+ "version": "3.6.8",
4
4
  "description": "The official MongoDB driver for Node.js",
5
5
  "main": "index.js",
6
6
  "files": [