fix: 🐛
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user