diff --git a/lib/topologies/server.js b/lib/topologies/server.js index c482cb8bc..6c677ebba 100644 --- a/lib/topologies/server.js +++ b/lib/topologies/server.js @@ -266,7 +266,12 @@ function configureWireProtocolHandler(self, ismaster) { function disconnectHandler(self, type, ns, cmd, options, callback) { // Topology is not connected, save the call in the provided store to be // Executed at some point when the handler deems it's reconnected - if (!self.s.pool.isConnected() && self.s.disconnectHandler != null && !options.monitoring) { + if ( + !self.s.pool.isConnected() && + self.s.options.reconnect && + self.s.disconnectHandler != null && + options.monitoring + ) { self.s.disconnectHandler.add(type, ns, cmd, options, callback); return true; }