mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 08:38:50 +00:00
update close() usage
Signed-off-by: BilligsterUser <billigsteruser@protonmail.com>
This commit is contained in:
8
pool.ts
8
pool.ts
@@ -12,13 +12,11 @@ export class SimplePool {
|
||||
this._conn = {}
|
||||
}
|
||||
|
||||
async close(relays: string[]): Promise<void> {
|
||||
await Promise.all(
|
||||
relays.map(async url => {
|
||||
close(relays: string[]): void {
|
||||
relays.map(url => {
|
||||
let relay = this._conn[normalizeURL(url)]
|
||||
if (relay) await relay.close()
|
||||
if (relay) relay.close()
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
async ensureRelay(url: string): Promise<Relay> {
|
||||
|
||||
Reference in New Issue
Block a user