aboutsummaryrefslogtreecommitdiff
path: root/xmpp/handlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/handlers.go')
-rw-r--r--xmpp/handlers.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/xmpp/handlers.go b/xmpp/handlers.go
index 59d4c62..1b4f6a3 100644
--- a/xmpp/handlers.go
+++ b/xmpp/handlers.go
@@ -170,7 +170,9 @@ func handlePresence(s xmpp.Sender, p stanza.Presence) {
// destroy session
case "unsubscribed", "unsubscribe":
if session.Disconnect(fromJid.Resource, false) {
+ sessionLock.Lock()
delete(sessions, bareFromJid)
+ sessionLock.Unlock()
}
// go offline
case "unavailable", "error":