File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 3
3
const Aspect = require ( './operation' ) . Aspect ;
4
4
const defineAspects = require ( './operation' ) . defineAspects ;
5
5
const OperationBase = require ( './operation' ) . OperationBase ;
6
+ const NativeTopology = require ( '../topologies/native_topology' ) ;
6
7
7
8
class CloseOperation extends OperationBase {
8
9
constructor ( client , force ) {
@@ -16,8 +17,11 @@ class CloseOperation extends OperationBase {
16
17
const force = this . force ;
17
18
const completeClose = err => {
18
19
client . emit ( 'close' , client ) ;
19
- for ( const item of client . s . dbCache ) {
20
- item [ 1 ] . emit ( 'close' , client ) ;
20
+
21
+ if ( ! ( client . topology instanceof NativeTopology ) ) {
22
+ for ( const item of client . s . dbCache ) {
23
+ item [ 1 ] . emit ( 'close' , client ) ;
24
+ }
21
25
}
22
26
23
27
client . removeAllListeners ( 'close' ) ;
You can’t perform that action at this time.
0 commit comments