Skip to content

Commit 188c23e

Browse files
authored
fix: don't immediately schedule monitoring after streaming failure
When a failure occurs while streaming topology updates, we need to wait some time before restarting the monitoring protocol. It's likely that if some error closed the connection, an immediate attempt to reconnect will also fail, leading to tight failure loops. NODE-2711
1 parent a256485 commit 188c23e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/core/sdam/monitor.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ class Monitor extends EventEmitter {
134134
const minHeartbeatFrequencyMS = this.options.minHeartbeatFrequencyMS;
135135
this[kMonitorId] = makeInterruptableAsyncInterval(monitorServer(this), {
136136
interval: heartbeatFrequencyMS,
137-
minInterval: minHeartbeatFrequencyMS,
138-
immediate: true
137+
minInterval: minHeartbeatFrequencyMS
139138
});
140139
}
141140

0 commit comments

Comments
 (0)