Skip to content

Commit 387f111

Browse files
clarifying comment
1 parent 064a83c commit 387f111

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/sdam/server.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -402,13 +402,7 @@ export class Server extends TypedEventEmitter<ServerEvents> {
402402
error instanceof MongoNetworkError && error.beforeHandshake;
403403
const isAuthHandshakeError = error.hasErrorLabel(MongoErrorLabel.HandshakeError);
404404

405-
// TODO: considering parse errors as SDAM unrecoverable errors seem
406-
// questionable. What if the parse error only comes from an application connection,
407-
// indicating some bytes were lost in transmission? It seems overkill to completely
408-
// kill the server.
409-
// Parse errors from monitoring connections are already handled because the
410-
// error would be wrapped in a ServerHeartbeatFailedEvent, which would mark the
411-
// server unknown and clear the pool. Can we remove this?
405+
// Perhaps questionable and divergent from the spec, but considering MongoParseErrors like state change errors was legacy behavior.
412406
if (isStateChangeError(error) || error instanceof MongoParseError) {
413407
const shouldClearPool = isNodeShuttingDownError(error);
414408

0 commit comments

Comments
 (0)