From db94aa162ae631ff7afe63a0849ed7aff640248d Mon Sep 17 00:00:00 2001 From: Yonle Date: Tue, 7 Nov 2023 20:48:56 +0700 Subject: [PATCH] Fix EOSE handling Signed-off-by: Yonle --- bouncer/bouncer1.js | 2 +- bouncer/bouncer2.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bouncer/bouncer1.js b/bouncer/bouncer1.js index a046b62..3dd1fe6 100644 --- a/bouncer/bouncer1.js +++ b/bouncer/bouncer1.js @@ -138,7 +138,7 @@ function newConn(addr) { reqLimit.set(subID, remainingEvents); } - if (!remainingEvents) { + if (remainingEvents < 1) { // Once there are no remaining event, Do the instructed above. csess.get(cID)?.send(JSON.stringify(["EOSE", sID])); pendingEOSE.delete(subID); diff --git a/bouncer/bouncer2.js b/bouncer/bouncer2.js index 6b68cd5..6af7b53 100644 --- a/bouncer/bouncer2.js +++ b/bouncer/bouncer2.js @@ -147,7 +147,7 @@ function newConn(addr, id) { reqLimit.set(subID, remainingEvents); } - if (!remainingEvents) { + if (remainingEvents < 1) { // Once there are no remaining event, Do the instructed above. csess.get(id)?.send(JSON.stringify(["EOSE", data[1]])); pendingEOSE.delete(subID);