bouncer: fix multiple EOSE being sent when received very new event.

This commit is contained in:
Yonle 2024-03-21 22:20:16 +07:00
parent 91efce8bbf
commit 7fa955dc25

View File

@ -287,7 +287,7 @@ function newConn(addr, id, reconn_t = 0) {
// If it's at the limit, Send EOSE to client and delete pendingEOSE of subID
// Skip if EOSE has been omitted
if (!client.pendingEOSE.has(data[1])) return;
if (!client.pendingEOSE.has(data[1]) || client.pause_subs.has(data[1])) return;
const limit = getFilterLimit(filter);
if (limit === Infinity) return;
if (client.events.get(data[1]).size >= limit) {