diff --git a/src/services/client.service.ts b/src/services/client.service.ts index 888e478..df24a08 100644 --- a/src/services/client.service.ts +++ b/src/services/client.service.ts @@ -186,6 +186,7 @@ class ClientService extends EventTarget { ) { const newEventIdSet = new Set() const requestCount = subRequests.length + const threshold = Math.ceil(requestCount / 2) let eventIdSet = new Set() let events: NEvent[] = [] let eosedCount = 0 @@ -200,6 +201,10 @@ class ClientService extends EventTarget { if (_eosed) { eosedCount++ } + if (eosedCount < threshold) { + return + } + _events.forEach((evt) => { if (eventIdSet.has(evt.id)) return eventIdSet.add(evt.id)