mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
On macOS and iOS, the TunnelManager instance stays active across sessions. This contains a Resource cache used to fetch Resources from the tunnel process. This cache wasn't cleared across sessions, so the first time the callback fired the Resources shown were the ones from the last session. After `1s`, they were correctly set to the current session's Resources due to the `beginUpdatingResources` timer. We were already clearing the stored Hash of the Resource cache on disconnect, but not the Resource cache itself. This patch fixes that bug by re-initializing the cache when the tunnel session is `disconnected`.