mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-18 05:42:03 +01:00
try to improve handling EOSE for cached relays
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
bc0ff44ad0
commit
97e6293150
@ -375,7 +375,8 @@ function newConn(addr, id, reconn_t = 0) {
|
||||
|
||||
if (log_about_relays) console.log(process.pid, "---", id, `got EOSE from ${addr} for ${data[1]}. There are ${client.pendingEOSE.get(data[1])} EOSE received out of ${userRelays.get(id).size} connected relays.`);
|
||||
|
||||
if (wait_eose && ((client.pendingEOSE.get(data[1]) < max_eose_score) || (client.pendingEOSE.get(data[1]) < userRelays.get(id).size))) return;
|
||||
if (!relay.isCache && (wait_eose && ((client.pendingEOSE.get(data[1]) < max_eose_score) || (client.pendingEOSE.get(data[1]) < userRelays.get(id).size)))) return;
|
||||
if (relay.isCache && !client.events.get(data[1]).size) return; // if cache relays did not send anything but EOSE, Don't send EOSE yet.
|
||||
client.pendingEOSE.delete(data[1]);
|
||||
|
||||
if (client.pause_subs.has(data[1])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user