Document relay readiness probe

This commit is contained in:
thePR0M3TH3AN committed 2025-09-24 16:27:51 -04:00
1 parent 5d0003c13d
commit 2542e97398
1 file changed
+5
+5
View File
@@ -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(