Skip to content

Commit

Permalink
worker: newsess: rehandle loadbalancer config handling
Browse files Browse the repository at this point in the history
Signed-off-by: Yonle <yonle@lecturify.net>
  • Loading branch information
Yonle committed May 28, 2024
1 parent 95f88d0 commit a187fed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worker_bouncer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let { relays, log_about_relays, server_meta, private_keys, reconnect_time, wait_
log_about_relays = process.env.LOG_ABOUT_RELAYS || log_about_relays;

loadbalancer = loadbalancer || [];
if (relays.length) loadbalancer.unshift("_me");
if (relays.length) loadbalancer.unshift(undefined);

// CL MaxEoseScore: Set <max_eose_score> as 0 if configured relays is under of the expected number from <max_eose_score>
if (relays.length < max_eose_score) max_eose_score = 0;
Expand Down Expand Up @@ -184,7 +184,7 @@ function newsess() {
}

switch (shift) {
case "_me":
case undefined:
for (const url of relays) {
newConn(url, id);
}
Expand Down

0 comments on commit a187fed

Please sign in to comment.