Skip to content

Commit 7a3b99b

Browse files
committed
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 9dee21f commit 7a3b99b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/sdam/monitor.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ class Monitor extends EventEmitter {
137137
const minHeartbeatFrequencyMS = this.options.minHeartbeatFrequencyMS;
138138
this[kMonitorId] = makeInterruptableAsyncInterval(monitorServer(this), {
139139
interval: heartbeatFrequencyMS,
140-
minInterval: minHeartbeatFrequencyMS,
141-
immediate: true
140+
minInterval: minHeartbeatFrequencyMS
142141
});
143142
}
144143

0 commit comments

Comments
 (0)