MCPcopy Create free account
hub / github.com/block/buzz / flushEventBuffer

Method flushEventBuffer

desktop/src/shared/api/relayClientSession.ts:813–825  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

811 }
812
813 private flushEventBuffer() {
814 this.flushTimeout = null;
815 const buffer = this.eventBuffer;
816 this.eventBuffer = [];
817
818 // Re-lookup: subscriptions removed during batch window are intentionally skipped.
819 for (const { subId, event } of buffer) {
820 const subscription = this.subscriptions.get(subId);
821 if (subscription?.mode === "live") {
822 subscription.onEvent(event);
823 }
824 }
825 }
826
827 private handleEose(subId: string) {
828 const subscription = this.subscriptions.get(subId);

Callers 1

handleEventMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected