Skip to content

Commit cc9f288

Browse files
committed
fix(collection): avoid buffering if creating a collection during a connection interruption
1 parent 5af0a10 commit cc9f288

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/collection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function Collection(name, conn, opts) {
2929
this.collectionName = name;
3030
this.conn = conn;
3131
this.queue = [];
32-
this.buffer = true;
32+
this.buffer = !conn?._hasOpened;
3333
this.emitter = new EventEmitter();
3434

3535
if (STATES.connected === this.conn.readyState) {

0 commit comments

Comments
 (0)