mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-27 17:58:47 +00:00
iOS does not report the sockets of the previous network as broken, so after switching between Wi-Fi and mobile the agent keeps using dead sessions - setting network info does not drop them. Recovery only happened when the OS finally failed the socket, via TCP keep-alive or the SMP ping monitor, taking from ~90 seconds to tens of minutes. Reconnect the servers on every network change after the first one, when the network is online. Changes that keep the same network type, e.g. switching between Wi-Fi networks, are not detected, as network info only has the network type.