Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit d822391ede0ea9a4f9eea66e5cceffffd6c81f1e Author: Duco van Amstel <duco.vanamstel@gmail.com> Date: Tue Apr 23 22:08:34 2019 +0000 Add lacking clean-up in Slack synchronisation (#811) diff --git a/bridge/slack/users_channels.go b/bridge/slack/users_channels.go index 23807c8..ce14e50 100644 --- a/bridge/slack/users_channels.go +++ b/bridge/slack/users_channels.go @@ -876 +8711 @@ func (b *users) populateUser(userID string) {   // in case the previous query failed for some reason.   } else {   b.usersSyncPoints[userID] = make(chan struct{}) + defer func() { + // Wake up any waiting goroutines and remove the synchronization point. + close(b.usersSyncPoints[userID]) + delete(b.usersSyncPoints, userID) + }()   break   }   } @@ -10610 +1116 @@ func (b *users) populateUser(userID string) {     // Register user information.   b.users[userID] = user - - // Wake up any waiting goroutines and remove the synchronization point. - close(b.usersSyncPoints[userID]) - delete(b.usersSyncPoints, userID)  }    func (b *users) populateUsers(wait bool) {