mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
Document relay readiness probe
This commit is contained in:
1 parent
5d0003c13d
commit
2542e97398
1 file changed
+5
@@ -220,6 +220,11 @@ class NostrClient {
|
||||
}
|
||||
}
|
||||
|
||||
// We subscribe to kind `0` purely as a liveness probe because almost every
|
||||
// relay can answer it quickly. Either an `event` or `eose` signals success,
|
||||
// while the 5s timer guards against relays that never respond. We immediately
|
||||
// `unsub` to avoid leaking subscriptions. Note: any future change must still
|
||||
// provide a lightweight readiness check with similar timeout semantics.
|
||||
async connectToRelays() {
|
||||
return Promise.all(
|
||||
this.relays.map(
|
||||
|
||||
Reference in new issue
Block a user