mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
When changing address mode, we would close all a user's update channels and create them from scratch. This involved setting user.updateCh to a new value. However, it was possible for other goroutines to read from user.updateCh during this time. I replaced it with a call to user.updateCh.Clear(), which is threadsafe.