Merge pull request #54 from PR0M3TH3AN/codex/add-comment-to-connecttorelays-implementation

Add documentation for relay readiness probe
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2025-09-24 16:28:51 -04:00
commit 9927b7e4ec
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(