We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c976a01 commit b94519bCopy full SHA for b94519b
lib/core/sdam/monitor.js
@@ -222,9 +222,10 @@ function checkServer(monitor, callback) {
222
}
223
224
const isMaster = result.result;
225
- const duration = isAwaitable
226
- ? monitor[kRTTPinger].roundTripTime
227
- : calculateDurationInMs(start);
+ const rttPinger = monitor[kRTTPinger];
+
+ const duration =
228
+ isAwaitable && rttPinger ? rttPinger.roundTripTime : calculateDurationInMs(start);
229
230
monitor.emit(
231
'serverHeartbeatSucceeded',
0 commit comments