I think this fixes it:
Index: plugins/mod_smacks.lua
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
--- a/plugins/mod_smacks.lua (revision
d4daf40caa518a89e51222e6e1d9c230db02839a)
+++ b/plugins/mod_smacks.lua (date 1670649730425)
@@ -493,13 +493,13 @@
sessionmanager.destroy_session(session, "Hibernating too long");
sessions_expired(1);
end);
+ -- we need the queue in advance because on conn:close the session will
be destroyed and queue cleaned
+ local queue = session.outgoing_stanza_queue;
if session.conn then
local conn = session.conn;
- c2s_sessions[conn] = nil;
- session.conn = nil;
conn:close();
end
- module:fire_event("smacks-hibernation-start", { origin = session;
queue = session.outgoing_stanza_queue:table() });
+ module:fire_event("smacks-hibernation-start", { origin = session;
queue = queue:table() });
return true; -- Postpone destruction for now
end);
Clearing the shared sessions table and the conn in session is done in
listener.ondisconnect in mod_c2s if session is found.
But if we first clear the shared table and then call conn:close() the
session is not found in the cache to be destroyed.
On Friday, December 9, 2022 at 6:46:41 PM UTC-6 Damian Minkov wrote:
> We(the Jitsi Team) have noticed that many sessions in prosody are unbind
> (the hook pre-resource-unbind) with an error "Hibernating too long". We are
> using mod_smacks that comes with prosody 0.12.1.
>
> While debugging we found out that the old mod_smack module from the
> community modules does not have this problem.
>
> The simplest scenario is when we open the prejoin page of jitsi-meet, that
> establishes an xmpp connection over websocket and we close the browser tab.
>
> Without loading mod_smacks or when you load the old community module you
> can see in the logs "Dec 10 00:17:30 c2s55d7399259e0 info Client
> disconnected: connection closed" when you close the tab. With the smacks
> module from latest prosody that log is not printed.
> Have you seen this? Do you want more information or some debug info to
> track it down?
>
> Thank you
> damencho
>
>
--
You received this message because you are subscribed to the Google Groups
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prosody-dev/9fb0a38b-5296-4a78-af90-98e6050caf81n%40googlegroups.com.