Skip to content

Commit

Permalink
remove unnecessary buffering
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Jan 17, 2024
1 parent d54c407 commit 6ad9dbf
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,6 @@ module.exports = function(connect) {

MongoDBStore.prototype.clear = function(callback) {
const _this = this;
if (!this.db) {
return this._emitter.once('connected', function() {
_this.clear.call(_this, callback);
});
}

this.collection.deleteMany({}).
then(() => {
Expand All @@ -204,12 +199,6 @@ module.exports = function(connect) {
MongoDBStore.prototype.set = function(id, session, callback) {
const _this = this;

if (!this.db) {
return this._emitter.once('connected', function() {
_this.set.call(_this, id, session, callback);
});
}

const sess = {};
for (const key in session) {
if (key === 'cookie') {
Expand Down

0 comments on commit 6ad9dbf

Please sign in to comment.