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);