Skip to content

Commit c60f8dc

Browse files
committed
Race condition.
1 parent f5e4474 commit c60f8dc

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

packages/firestore/src/util/bundle_reader.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ export class BundleReader {
8585
private bundleStream:
8686
| ReadableStream<Uint8Array | ArrayBuffer>
8787
| Uint8Array
88-
| ArrayBuffer,
89-
/** Async queue used to perform bundle reading. */
90-
private asyncQueue: AsyncQueue = new AsyncQueue()
88+
| ArrayBuffer
9189
) {
9290
if (
9391
bundleStream instanceof Uint8Array ||
@@ -127,9 +125,7 @@ export class BundleReader {
127125
* have reached the end of the stream.
128126
*/
129127
async nextElement(): Promise<SizedBundleElement | null> {
130-
// Ensures `nextElementImpl` calls are executed sequentially before they
131-
// modifies internal buffer.
132-
return this.asyncQueue.enqueue(() => this.nextElementImpl());
128+
return this.nextElementImpl();
133129
}
134130

135131
/**

packages/firestore/test/unit/util/bundle.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function lengthPrefixedString(o: {}): string {
6262
});
6363

6464
// eslint-disable-next-line no-restricted-properties
65-
(isNode() ? describe.skip : describe)('Bundle ', () => {
65+
(isNode() ? describe.skip : describe.only)('Bundle ', () => {
6666
genericBundleReadingTests(1);
6767
genericBundleReadingTests(4);
6868
genericBundleReadingTests(64);

0 commit comments

Comments
 (0)