mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2026-02-01 06:48:51 +00:00
prevent reconnections when initial connection fails.
This commit is contained in:
@@ -157,6 +157,7 @@ export class AbstractRelay {
|
|||||||
clearTimeout(connectionTimeoutHandle)
|
clearTimeout(connectionTimeoutHandle)
|
||||||
reject('connection failed')
|
reject('connection failed')
|
||||||
this.connectionPromise = undefined
|
this.connectionPromise = undefined
|
||||||
|
this.closedIntentionally = true // prevent reconnect attempts on initial connection failure
|
||||||
this.onclose?.()
|
this.onclose?.()
|
||||||
this.handleHardClose('relay connection failed')
|
this.handleHardClose('relay connection failed')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user