From 65cddf803008084f2cccb87e92c908940edf8bff Mon Sep 17 00:00:00 2001 From: Yonle Date: Sat, 11 May 2024 14:07:35 +0700 Subject: [PATCH] bouncer: trigger EOSE according to max_known_events value if available Signed-off-by: Yonle --- worker_bouncer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worker_bouncer.js b/worker_bouncer.js index 35535aa..57f5c03 100644 --- a/worker_bouncer.js +++ b/worker_bouncer.js @@ -79,6 +79,9 @@ parentPort.on('message', m => { filters[fn].limit = ws.forcedLimit; } + if (max_known_events && getFilterLimit(filter) > max_known_events) + filter.limit = max_known_events; + ws.subs[origID] = filters; ws.events[origID] = new Set(); ws.pause_subs.delete(origID);