mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-15 08:40:26 +00:00
Add lacking clean-up in Slack synchronisation (#811)
This commit is contained in:
parent
1c3e764d57
commit
aefa8a9341
@ -87,6 +87,11 @@ func (b *users) populateUser(userID string) {
|
|||||||
// in case the previous query failed for some reason.
|
// in case the previous query failed for some reason.
|
||||||
} else {
|
} else {
|
||||||
b.usersSyncPoints[userID] = make(chan struct{})
|
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
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,10 +111,6 @@ func (b *users) populateUser(userID string) {
|
|||||||
|
|
||||||
// Register user information.
|
// Register user information.
|
||||||
b.users[userID] = user
|
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) {
|
func (b *users) populateUsers(wait bool) {
|
||||||
|
Loading…
Reference in New Issue
Block a user