mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-10-12 02:22:45 +00:00
agent: restart retry loops when reconnecting all servers
reconnectAllServers closes the clients but left every retry loop waiting out its current interval, so "Reconnect all servers" and a network config change could take up to the maximum interval to deliver anything. It now increments the network epoch as a network change does, after closing the clients.
This commit is contained in:
@@ -754,6 +754,7 @@ reconnectAllServers c = do
|
||||
reconnectServerClients c smpClients
|
||||
reconnectServerClients c xftpClients
|
||||
reconnectServerClients c ntfClients
|
||||
atomically $ modifyTVar' (networkEpoch c) (+ 1)
|
||||
|
||||
-- | Register device notifications token
|
||||
registerNtfToken :: AgentClient -> NetworkRequestMode -> DeviceToken -> NotificationsMode -> AE NtfTknStatus
|
||||
|
||||
Reference in New Issue
Block a user