mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-28 02:21:42 +01:00
fix [relays: Re-sub after reconnect]
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
1776c4c888
commit
8370bf2cd7
@ -92,7 +92,7 @@ function newConn(addr) {
|
||||
relay.on('open', _ => {
|
||||
socks.add(relay); // Add this socket session to [socks]
|
||||
console.log(process.pid, "---", `[${socks.size}/${relays.length}]`, relay.addr, "is connected");
|
||||
for (i of db.prepare("SELECT subID FROM sess WHERE cID = ?;").iterate(id)) {
|
||||
for (i of sess.prepare("SELECT subID FROM sess WHERE cID = ?;").iterate(id)) {
|
||||
if (relay.readyState >= 2) break;
|
||||
relay.send(JSON.stringify(["REQ", i.subID]));
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ function newConn(addr, id) {
|
||||
relay.on('open', _ => {
|
||||
socks.add(relay); // Add this socket session to [socks]
|
||||
console.log(process.pid, "---", `[${id}] [${socks.size}/${relays.length}]`, relay.addr, "is connected");
|
||||
for (i of db.prepare("SELECT subID FROM sess WHERE cID = ?;").iterate(id)) {
|
||||
for (i of sess.prepare("SELECT subID FROM sess WHERE cID = ?;").iterate(id)) {
|
||||
if (relay.readyState >= 2) break;
|
||||
relay.send(JSON.stringify(["REQ", i.subID]));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user