From f052d633ac722371271c4d621fa3046c4201956f Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Sat, 29 Jan 2022 00:19:33 -0500 Subject: Fix concurrent map writes in presence queue --- xmpp/component.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xmpp/component.go') 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() } } -- cgit v1.2.3