mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 08:27:04 +00:00
fix: give up on unreachable relays so the rooms list resolves
Follow-up to the no-progress retry: in this trace vitor/mom/nos.lol never connect at all (only damus gets a REQ — the other three cannot-connect for both live and history). The retry correctly re-attempts, but it can't reach relays that won't connect, so every round is 0 events, no relay is ever 'done', exhausted never completes, and it retries forever — a cold, empty feed stays on the spinner. The round-model history had no give-up for repeated cannot-connect (only for CLOSE), unlike the convo path. Route onCannotConnect through the same pager give-up as onClosed, so a relay that's unreachable for a few rounds is abandoned, exhaustion completes, and the screen resolves (to the loaded rooms, or empty + retry) instead of spinning forever. The streak resets on any contact, so a merely slow relay that connects within a few attempts isn't dropped. Applied to both round-model managers. https://claude.ai/code/session_01B1fmmmX8JjQWH3amMLdvcW
This commit is contained in:
+5
@@ -328,7 +328,12 @@ class AccountGiftWrapsHistoryEoseManager(
|
||||
message: String,
|
||||
forFilters: List<Filter>?,
|
||||
) {
|
||||
// Cannot-connect is also "no answer": count it toward give-up like a CLOSE, so a relay
|
||||
// that's unreachable (down / blocked) doesn't keep exhaustion false forever — otherwise a
|
||||
// cold, empty feed would retry it endlessly and stay on the spinner. Once it's given up,
|
||||
// exhaustion can complete and the screen resolves (to the loaded rooms, or empty + retry).
|
||||
windowLoad.onRelaySettled(relay)
|
||||
if (pager.onClosed(user.pubkeyHex, relay)) markExhaustedIfAllDone(user)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -282,7 +282,11 @@ class ChatroomListNip04HistorySubAssembler(
|
||||
message: String,
|
||||
forFilters: List<Filter>?,
|
||||
) {
|
||||
// Count cannot-connect toward give-up like a CLOSE, so an unreachable relay doesn't keep
|
||||
// exhaustion false forever (otherwise a cold, empty feed retries it endlessly and stays on
|
||||
// the spinner). Once given up, exhaustion completes and the screen resolves.
|
||||
windowLoad.onRelaySettled(relay)
|
||||
if (pager.onClosed(user.pubkeyHex, relay)) markExhaustedIfAllDone(user)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user