@@ -50,15 +50,14 @@ function checkSupportedServer(ismaster: any, options: any) {
50
50
return new MongoError ( message ) ;
51
51
}
52
52
53
- const message = `Server at ${ options . host } :${
54
- options . port
55
- } reports maximum wire version ${ ismaster . maxWireVersion ||
56
- 0 } , but this version of the Node.js Driver requires at least ${ MIN_SUPPORTED_WIRE_VERSION } (MongoDB ${ MIN_SUPPORTED_SERVER_VERSION } )`;
53
+ const message = `Server at ${ options . host } :${ options . port } reports maximum wire version ${
54
+ ismaster . maxWireVersion || 0
55
+ } , but this version of the Node.js Driver requires at least ${ MIN_SUPPORTED_WIRE_VERSION } (MongoDB ${ MIN_SUPPORTED_SERVER_VERSION } )`;
57
56
return new MongoError ( message ) ;
58
57
}
59
58
60
59
function performInitialHandshake ( conn : any , options : any , _callback : any ) {
61
- const callback = function ( err ?: any , ret ?: any ) {
60
+ const callback = function ( err ?: any , ret ?: any ) {
62
61
if ( err && conn ) {
63
62
conn . destroy ( ) ;
64
63
}
@@ -205,11 +204,9 @@ function parseSslOptions(family: any, options: any) {
205
204
206
205
// Override checkServerIdentity behavior
207
206
if ( options . checkServerIdentity === false ) {
208
- // Skip the identiy check by retuning undefined as per node documents
207
+ // Skip the identity check by retuning undefined as per node documents
209
208
// https://nodejs.org/api/tls.html#tls_tls_connect_options_callback
210
- result . checkServerIdentity = function ( ) {
211
- return undefined ;
212
- } ;
209
+ result . checkServerIdentity = ( ) => undefined ;
213
210
} else if ( typeof options . checkServerIdentity === 'function' ) {
214
211
result . checkServerIdentity = options . checkServerIdentity ;
215
212
}
@@ -244,7 +241,7 @@ function makeConnection(family: any, options: any, cancellationToken: any, _call
244
241
}
245
242
246
243
let socket : any ;
247
- const callback = function ( err ?: any , ret ?: any ) {
244
+ const callback = function ( err ?: any , ret ?: any ) {
248
245
if ( err && socket ) {
249
246
socket . destroy ( ) ;
250
247
}
0 commit comments