Skip to content

Commit

Permalink
worker_bouncer: small fix but does not really hurt that much
Browse files Browse the repository at this point in the history
Signed-off-by: Yonle <yonle@lecturify.net>
  • Loading branch information
Yonle committed Jun 8, 2024
1 parent 455b567 commit 4af2f40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker_bouncer.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class newConn extends WebSocket {
if (!this.isLoadBalancer) client.events[data[1]].add(data[2]?.id);
parentPort.postMessage({ type: "upstream_msg", id, data: JSON.stringify(data) });

if (max_known_events && client.events[data[1]].size >= max_known_events)
if (max_known_events && client.events[data[1]].size > max_known_events)
client.events[data[1]].delete(client.events[data[1]].values().next().value);

stats._global.rx++;
Expand Down

0 comments on commit 4af2f40

Please sign in to comment.