fix: 🐛

This commit is contained in:
codytseng
2025-11-19 09:57:57 +08:00
parent 25d8ad1532
commit c845a4fc4f

View File

@@ -384,7 +384,7 @@ class ClientService extends EventTarget {
// eslint-disable-next-line @typescript-eslint/no-this-alias
const that = this
const _knownIds = new Set<string>()
let startedCount = 0
let startedCount = relays.length
let eosedCount = 0
let eosed = false
let closedCount = 0
@@ -396,7 +396,6 @@ class ClientService extends EventTarget {
subPromises.push(startSub())
async function startSub() {
startedCount++
const relay = await that.pool.ensureRelay(url, { connectionTimeout: 5000 }).catch(() => {
return undefined
})
@@ -451,6 +450,7 @@ class ClientService extends EventTarget {
.then(() => {
hasAuthed = true
if (!eosed) {
startedCount++
subPromises.push(startSub())
}
})
@@ -718,7 +718,7 @@ class ClientService extends EventTarget {
resolve(events)
}
},
onclose: () => {
onAllClose: () => {
resolve(events)
}
})