Skip to content

Commit

Permalink
fix(ClientSessions): initialize clientOptions and cluster time
Browse files Browse the repository at this point in the history
Fixes NODE-1557
  • Loading branch information
Sam Pal authored and daprahamian committed Aug 13, 2019
1 parent b146e26 commit b95d64e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/core/sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class ClientSession extends EventEmitter {
}

options = options || {};
clientOptions = clientOptions || {};

this.topology = topology;
this.sessionPool = sessionPool;
this.hasEnded = false;
Expand All @@ -81,12 +83,7 @@ class ClientSession extends EventEmitter {
typeof options.causalConsistency !== 'undefined' ? options.causalConsistency : true
};

options = options || {};
if (typeof options.initialClusterTime !== 'undefined') {
this.clusterTime = options.initialClusterTime;
} else {
this.clusterTime = null;
}
this.clusterTime = options.initialClusterTime;

this.operationTime = null;
this.explicit = !!options.explicit;
Expand Down

0 comments on commit b95d64e

Please sign in to comment.