Skip to content

Commit 37b45c1

Browse files
authored
feat(replay): Clear fallback buffer when switching buffers (#13914)
Saw this while debugging, this should not have a big effect since the fallback buffer should be relatively small.
1 parent ed2e556 commit 37b45c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/replay-internal/src/eventBuffer/EventBufferProxy.ts

+3
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ export class EventBufferProxy implements EventBuffer {
115115
// Wait for original events to be re-added before resolving
116116
try {
117117
await Promise.all(addEventPromises);
118+
119+
// Can now clear fallback buffer as it's no longer necessary
120+
this._fallback.clear();
118121
} catch (error) {
119122
DEBUG_BUILD && logger.exception(error, 'Failed to add events when switching buffers.');
120123
}

0 commit comments

Comments
 (0)