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

Method close

src/sdam/monitor.ts:196–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194 }
195
196 close(): void {
197 if (isInCloseState(this)) {
198 return;
199 }
200
201 stateTransition(this, STATE_CLOSING);
202 resetMonitorState(this);
203
204 // close monitor
205 this.emit('close');
206 stateTransition(this, STATE_CLOSED);
207 }
208
209 get roundTripTime(): number {
210 return this.rttSampler.average();

Callers 2

resetMonitorStateFunction · 0.45
onHeartbeatSucceededFunction · 0.45

Calls 3

isInCloseStateFunction · 0.85
resetMonitorStateFunction · 0.85
emitMethod · 0.65

Tested by

no test coverage detected