From da39d1efc7f7cfe62d81bb540745c93313a8fd3a Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Sun, 13 Oct 2019 11:59:58 -0400 Subject: [PATCH] fix(replset): correct server leak on initial connect --- lib/core/topologies/replset.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/core/topologies/replset.js b/lib/core/topologies/replset.js index a5c58bffd4..89403ea4ae 100644 --- a/lib/core/topologies/replset.js +++ b/lib/core/topologies/replset.js @@ -378,6 +378,7 @@ function connectNewServers(self, servers, callback) { // Command Monitoring events relayEvents(server, self, ['commandStarted', 'commandSucceeded', 'commandFailed']); + self.s.connectingServers.push(server); server.connect(self.s.connectOptions); }, i); }