File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -398,7 +398,9 @@ Mongos.prototype.lastIsMaster = function() {
398
398
}
399
399
400
400
Mongos . prototype . close = function ( forceClosed ) {
401
- this . s . mongos . destroy ( ) ;
401
+ this . s . mongos . destroy ( {
402
+ force : typeof forceClosed == 'boolean' ? forceClosed : false ,
403
+ } ) ;
402
404
// We need to wash out all stored processes
403
405
if ( forceClosed == true ) {
404
406
this . s . storeOptions . force = forceClosed ;
Original file line number Diff line number Diff line change @@ -447,7 +447,10 @@ ReplSet.prototype.lastIsMaster = function() {
447
447
448
448
ReplSet . prototype . close = function ( forceClosed ) {
449
449
var self = this ;
450
- this . s . replset . destroy ( ) ;
450
+ // Call destroy on the topology
451
+ this . s . replset . destroy ( {
452
+ force : typeof forceClosed == 'boolean' ? forceClosed : false ,
453
+ } ) ;
451
454
// We need to wash out all stored processes
452
455
if ( forceClosed == true ) {
453
456
this . s . storeOptions . force = forceClosed ;
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ exports['Should correctly connect with default replicaset'] = {
131
131
db . open ( function ( err , p_db ) {
132
132
test . equal ( null , err ) ;
133
133
p_db . close ( ) ;
134
+ // process.exit(0)
134
135
135
136
// console.log("==============================================")
136
137
// console.dir(Object.keys(CoreConnection.connections()))
You can’t perform that action at this time.
0 commit comments