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

Method close

src/sdam/server.ts:256–270  ·  view source on GitHub ↗

Destroy the server connection

()

Source from the content-addressed store, hash-verified

254
255 /** Destroy the server connection */
256 close(): void {
257 if (this.s.state === STATE_CLOSED) {
258 return;
259 }
260
261 stateTransition(this, STATE_CLOSING);
262
263 if (!this.loadBalanced) {
264 this.monitor?.close();
265 }
266
267 this.pool.close();
268 stateTransition(this, STATE_CLOSED);
269 this.emit('closed');
270 }
271
272 /**
273 * Immediately schedule monitoring of this server. If there already an attempt being made

Callers 15

sdam_viz.jsFile · 0.45
bash_to_fish.mjsFile · 0.45
promptFunction · 0.45
closePoolMethod · 0.45
runCmapTestSuiteFunction · 0.45
configureFailPointFunction · 0.45
clearFailPointFunction · 0.45
destroyMethod · 0.45
helloMethod · 0.45
createClientEncryptionFunction · 0.45
operations.tsFile · 0.45
runUnifiedTestFunction · 0.45

Calls 1

emitMethod · 0.65

Tested by 15

cleanUpUsersFunction · 0.36
createUsersFunction · 0.36
testCappedFunction · 0.36
teardownMethod · 0.36
testFunction · 0.36
readFunction · 0.36
makeTestFunction · 0.36
testFunction · 0.36
findSortFunction · 0.36
cursorSortFunction · 0.36
deadlockTestFunction · 0.36
runProseTestsForFunction · 0.36