bug: cleanup subs
This commit is contained in:
parent
8462a7c04f
commit
01d5e01a89
@ -92,6 +92,9 @@ export class Query {
|
|||||||
for (const c of this.#sentToRelays) {
|
for (const c of this.#sentToRelays) {
|
||||||
c.CloseReq(this.id);
|
c.CloseReq(this.id);
|
||||||
}
|
}
|
||||||
|
for (const sq of this.subQueries) {
|
||||||
|
sq.sendClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eose(sub: string, relay: string) {
|
eose(sub: string, relay: string) {
|
||||||
|
@ -313,9 +313,7 @@ export class NostrSystem {
|
|||||||
let changed = false;
|
let changed = false;
|
||||||
for (const [k, v] of this.Queries) {
|
for (const [k, v] of this.Queries) {
|
||||||
if (v.closingAt && v.closingAt < now) {
|
if (v.closingAt && v.closingAt < now) {
|
||||||
if (v.leaveOpen) {
|
v.sendClose();
|
||||||
v.sendClose();
|
|
||||||
}
|
|
||||||
this.Queries.delete(k);
|
this.Queries.delete(k);
|
||||||
this.Feeds.delete(k);
|
this.Feeds.delete(k);
|
||||||
console.debug("Removed:", k);
|
console.debug("Removed:", k);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user