From e5485142f4d7a51437b2a94059c3a9867eab3022 Mon Sep 17 00:00:00 2001 From: Daria Pardue Date: Thu, 29 Sep 2022 11:17:47 -0400 Subject: [PATCH] refactor: use variable name instead of comment --- src/sdam/server.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sdam/server.ts b/src/sdam/server.ts index 2b6b24d1d1..a693bf3bc8 100644 --- a/src/sdam/server.ts +++ b/src/sdam/server.ts @@ -383,8 +383,9 @@ export class Server extends TypedEventEmitter { return; } - // ignore stale errors - if (error.connectionGeneration && error.connectionGeneration < this.s.pool.generation) { + const isStaleError = + error.connectionGeneration && error.connectionGeneration < this.s.pool.generation; + if (isStaleError) { return; }