Fix intermittent infinite 'Loading project...' hang (EOSE race with never-connected relays) - #954
Open
dangershony wants to merge 1 commit into
Open
Fix intermittent infinite 'Loading project...' hang (EOSE race with never-connected relays)#954dangershony wants to merge 1 commit into
dangershony wants to merge 1 commit into
Conversation
…acking of never-connected relays - Only track relays whose websocket is actually running in EOSE/OK snapshots; a relay that never completed the WS upgrade never sends EOSE and its DisconnectionHappened fired before monitoring started, blocking completion forever - Add 30s watchdog to InvestView remote project load so the UI falls back to an error message instead of spinning indefinitely - Query discovery (purple pages) relays for NIP-65 relay lists in LookupRelayListForNPubs and include them in EOSE tracking; close REQ on discovery relays too - Pass a real end-of-stream callback from MergeProjectRelays so the relay-list subscription isn't closed on the first EOSE from any relay - Add Settings link to the standalone InvestView header and loading/error states so users can fix relay/indexer settings when loading fails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Deep-linking to /investview/{projectId} intermittently hangs forever on the loading spinner. The indexer lookup succeeds, but the Nostr metadata fetch never completes when some relays (e.g. relay.damus.io, nostr-02.yakihonne.com) fail the WebSocket upgrade.
Root cause: the EOSE tracking snapshot in NostrCommunicationFactory.GetAllConnectedRelayNames() included all registered clients, even relays that never connected. Such relays never send EOSE, and their DisconnectionHappened event fired during startup — before any subscription was monitored — so nothing ever removed them from the tracking set and the 'all relays sent EOSE' completion callback never fired. Timing-dependent, hence intermittent.
Fixes
ull\ the relay-list subscription was closed on the first EOSE from any relay, often before results arrived
Validation