mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 00:16:59 +00:00
debug(relay): log connected-set vs pool cache after updatePool
The background teardown works (desired collapses to 11, toRemove=349) but the persistent notification still reports ~110 connected relays. That points at the _connectedRelays StateFlow (what the notification reads) being decoupled from the pool's desired set: it is only decremented from the async onFailure/onClosed websocket callback, while disconnect() uses OkHttp cancel() (immediate/violent). Add a post-reconcile log comparing cacheConnected (relays still in the pool reporting isConnected) against flowConnected (_connectedRelays.size) to confirm whether the 110 are live sockets or a stale count. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ukw6FJPFh3JKGXL532p3ae
This commit is contained in:
+1
@@ -175,6 +175,7 @@ class RelayPool(
|
||||
if (atLeastOne) {
|
||||
_availableRelays.update { relays.keys() }
|
||||
}
|
||||
Log.d("BgRelayTrace") { "updatePool done — cacheConnected=${connectedRelaysCount()}, flowConnected=${_connectedRelays.value.size}, inPool=${relays.size()}" }
|
||||
}
|
||||
|
||||
fun addRelay(relay: NormalizedRelayUrl): IRelayClient {
|
||||
|
||||
Reference in New Issue
Block a user