forked from Silverfish/proton-bridge
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.