Skip to content

Commit

Permalink
fix: dont treat failed heartbeat as heartbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Sep 17, 2024
1 parent 06839fa commit 86fea93
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/drivers/node-mongodb-native/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,6 @@ function _setClient(conn, client, options, dbName) {
client.on('serverHeartbeatSucceeded', () => {
conn._lastHeartbeatAt = Date.now();
});
client.on('serverHeartbeatFailed', () => {
conn._lastHeartbeatAt = Date.now();
});

if (options.monitorCommands) {
client.on('commandStarted', (data) => conn.emit('commandStarted', data));
Expand Down

0 comments on commit 86fea93

Please sign in to comment.