aboutsummaryrefslogtreecommitdiff
path: root/xmpp/component.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2022-01-29 08:19:33 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2022-01-29 08:19:33 +0300
commitf052d633ac722371271c4d621fa3046c4201956f (patch)
tree3995a648d542cb9ed69a37f58636e4964cf373f9 /xmpp/component.go
parent540c6cd546ccadbb2c32e435d1fdcb5af24a1360 (diff)
Fix concurrent map writes in presence queue
Diffstat (limited to 'xmpp/component.go')
-rw-r--r--xmpp/component.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/xmpp/component.go b/xmpp/component.go
index 4f5ad79..fb5732e 100644
--- a/xmpp/component.go
+++ b/xmpp/component.go
@@ -90,7 +90,9 @@ func heartbeat(component *xmpp.Component) {
if err != nil {
gateway.LogBadPresence(presence)
} else {
+ gateway.QueueLock.Lock()
delete(gateway.Queue, key)
+ gateway.QueueLock.Unlock()
}
}