mirror of
https://github.com/Yonle/bostr.git
synced 2025-09-28 22:02:29 +02:00
fix the improvement for pendingEOSE in mode 2
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
@@ -128,7 +128,7 @@ function newConn(addr, id) {
|
|||||||
case "EOSE":
|
case "EOSE":
|
||||||
if (!pendingEOSE.has(id + ":" + data[1])) return;
|
if (!pendingEOSE.has(id + ":" + data[1])) return;
|
||||||
pendingEOSE.set(id + ":" + data[1], pendingEOSE.get(id + ":" + data[1]) + 1);
|
pendingEOSE.set(id + ":" + data[1], pendingEOSE.get(id + ":" + data[1]) + 1);
|
||||||
if (pendingEOSE.get(id + ":" + data[1]) < relays.length) return;
|
if (pendingEOSE.get(id + ":" + data[1]) < Object.from(relays).filter(_ => _.id === id).length) return;
|
||||||
csess.get(id)?.send(JSON.stringify(data));
|
csess.get(id)?.send(JSON.stringify(data));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user