From 077edae986f2229d263f978b7cf35ed88254c042 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Wed, 5 Jan 2022 16:04:22 -0500 Subject: Add keeponline option --- xmpp/handlers.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xmpp/handlers.go') 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": -- cgit v1.2.3