MCPcopy
hub / github.com/mongodb/node-mongodb-native / cleanup

Method cleanup

src/sdam/server.ts:305–318  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303
304 let reauthPromise: Promise<void> | null = null;
305 const cleanup = () => {
306 this.decrementOperationCount();
307 if (session?.pinnedConnection !== conn) {
308 if (reauthPromise != null) {
309 // The reauth promise only exists if it hasn't thrown.
310 const checkBackIn = () => {
311 this.pool.checkIn(conn);
312 };
313 void reauthPromise.then(checkBackIn, checkBackIn);
314 } else {
315 this.pool.checkIn(conn);
316 }
317 }
318 };
319
320 let cmd;
321 try {

Callers

nothing calls this directly

Calls 2

checkInMethod · 0.80

Tested by

no test coverage detected