Skip to content

Commit 4393e0c

Browse files
committed
review comments
1 parent de7b22f commit 4393e0c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sdam/server_description.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ export class ServerDescription {
126126
this.me = hello?.me?.toLowerCase() ?? null;
127127
this.$clusterTime = hello?.$clusterTime ?? null;
128128
this.iscryptd = Boolean(hello?.iscryptd);
129+
130+
// NOTE: This actually builds the stack string instead of holding onto the getter and all its
131+
// associated references. This is done to prevent a memory leak.
132+
if (options.error) options.error.stack;
129133
}
130134

131135
get hostAddress(): HostAddress {

0 commit comments

Comments
 (0)