@@ -14,7 +14,6 @@ import {
14
14
} from './constants' ;
15
15
import { setupPerformanceObserver } from './coreHandlers/performanceObserver' ;
16
16
import { createEventBuffer } from './eventBuffer' ;
17
- import { EventBufferProxy } from './eventBuffer/EventBufferProxy' ;
18
17
import { getSession } from './session/getSession' ;
19
18
import { saveSession } from './session/saveSession' ;
20
19
import type {
@@ -330,18 +329,9 @@ export class ReplayContainer implements ReplayContainerInterface {
330
329
* from calling both `flush` and `_debouncedFlush`. Otherwise, there could be
331
330
* cases of mulitple flushes happening closely together.
332
331
*/
333
- public async flushImmediate ( waitForCompression ?: boolean ) : Promise < void > {
332
+ public flushImmediate ( ) : Promise < void > {
334
333
this . _debouncedFlush ( ) ;
335
334
// `.flush` is provided by the debounced function, analogously to lodash.debounce
336
-
337
- // Ensure the worker is loaded, so the sent event is compressed
338
- if ( waitForCompression && this . eventBuffer instanceof EventBufferProxy ) {
339
- try {
340
- await this . eventBuffer . ensureWorkerIsLoaded ( ) ;
341
- } catch ( error ) {
342
- // If this fails, we'll just send uncompressed events
343
- }
344
- }
345
335
return this . _debouncedFlush . flush ( ) as Promise < void > ;
346
336
}
347
337
@@ -553,7 +543,7 @@ export class ReplayContainer implements ReplayContainerInterface {
553
543
// filtered on the UI.
554
544
if ( this . recordingMode === 'session' ) {
555
545
// We want to ensure the worker is ready, as otherwise we'd always send the first event uncompressed
556
- void this . flushImmediate ( true ) ;
546
+ void this . flushImmediate ( ) ;
557
547
}
558
548
559
549
return true ;
0 commit comments