--- a/mod_saslauth_muc/mod_saslauth_muc.lua Tue Dec 14 00:02:10 2010 +0500
+++ b/mod_saslauth_muc/mod_saslauth_muc.lua Tue Dec 14 00:03:24 2010 +0500
@@ -42,8 +42,7 @@
end
-- Timer to clear SASL sessions
-timer.add_task(timeout, function()
- local now = os_time();
+timer.add_task(timeout, function(now)
for room, handlers in pairs(_rooms) do
for jid, handler in pairs(handlers) do
if handler.timeout <= now then handlers[jid] = nil; end
@@ -52,6 +51,9 @@
end
return timeout;
end);
+function module.unload()
+ timeout = nil; -- stop timer on unload
+end
-- Stanza handlers
module:hook("presence/full", function(event)