Skip to content

Commit

Permalink
Merge pull request #15187 from Automattic/vkarpov15/gh-14971
Browse files Browse the repository at this point in the history
fix(collection): avoid buffering if creating a collection during a connection interruption
  • Loading branch information
vkarpov15 authored Jan 20, 2025
2 parents d8c9d6c + cc9f288 commit 3e4ba3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function Collection(name, conn, opts) {
this.collectionName = name;
this.conn = conn;
this.queue = [];
this.buffer = true;
this.buffer = !conn?._hasOpened;
this.emitter = new EventEmitter();

if (STATES.connected === this.conn.readyState) {
Expand Down

0 comments on commit 3e4ba3f

Please sign in to comment.