fix: reset relay sockets on visibility change to prevent auth hangs on sleep/wake
When browser tab is hidden (sleep), tear down all relay socket connections completely. This forces fresh socket creation and clean auth handshake on wake, preventing stuck AuthStatus.PendingResponse states. - Add documentVisibility store tracking document.visibilityState - Call Pool.get().remove(url) for relay sockets during hidden teardown - Integrate socket reset in syncUserData, syncSpaces, syncDMs - Add explanatory comments for visibility guards and race conditions Fixes: App stuck in "Authenticating" after Mac sleep/wake cycle Tested with: wss://news.utxo.one/
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
Reference in New Issue
Block a user