Skip to content

Commit 9d48c79

Browse files
committed
fixes and comments
1 parent cb02359 commit 9d48c79

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

src/change_stream.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ export class ChangeStream<
897897
this.cursor.close().then(
898898
() => null,
899899
() => null
900-
); // TODO(NODE-XXX): Is this correct?
900+
); // Ignoring the result of close is intentional
901901

902902
const topology = getTopology(this.parent);
903903
topology.selectServer(this.cursor.readPreference, {}, serverSelectionError => {
@@ -930,7 +930,7 @@ export class ChangeStream<
930930
this.cursor.close().then(
931931
() => null,
932932
() => null
933-
); // TODO(NODE-XXX): Is this correct?;
933+
); // Ignoring the result of close is intentional
934934

935935
const topology = getTopology(this.parent);
936936
topology.selectServer(this.cursor.readPreference, {}, serverSelectionError => {

src/cmap/connect.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,7 @@ function makeSocks5Connection(options: MakeConnectionOptions, callback: Callback
490490
callback
491491
);
492492
},
493-
error => {
494-
if (error) {
495-
return callback(connectionFailureError('error', error));
496-
}
497-
}
493+
error => callback(connectionFailureError('error', error))
498494
);
499495
}
500496
);

src/cursor/abstract_cursor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ class ReadableCursorStream extends Readable {
886886
this._cursor.close().then(
887887
() => null,
888888
() => null
889-
); // TODO(NODE-XXXX): is this correct?
889+
); // Ignoring the result of close is intentional
890890
return this.push(null);
891891
}
892892

@@ -908,7 +908,7 @@ class ReadableCursorStream extends Readable {
908908
this._cursor.close().then(
909909
() => null,
910910
() => null
911-
); // TODO(NODE-XXXX): is this correct?
911+
); // Ignoring the result of close is intentional
912912
} else {
913913
if (this.push(result)) {
914914
return this._readNext();

src/operations/execute_operation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export function executeOperation<
147147
session.endSession().then(
148148
() => null,
149149
() => null
150-
);
150+
); // Ignoring the result of endSession is intentional
151151
}
152152

153153
throw error;

0 commit comments

Comments
 (0)