Software /
code /
prosody
Diff
core/sessionmanager.lua @ 12877:f6cca7cbf3b2 0.12
core.sessionmanager: Skip log when (not) destroying destroyed sessions
On regular disconnects, </stream> is sent, then
sessionmanager.destroy_session() is called, then
sessionmanager.destroy_session() is called again when the TCP connection
is closed, from ondisconnect in mod_c2s.
It is a bit annoying and doesn't really tell you much.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 19 Jan 2023 21:38:14 +0100 |
parent | 11518:3f1a865e9419 |
child | 12878:0d8bf401fa73 |
line wrap: on
line diff
--- a/core/sessionmanager.lua Sun Jan 22 14:45:47 2023 +0100 +++ b/core/sessionmanager.lua Thu Jan 19 21:38:14 2023 +0100 @@ -93,12 +93,11 @@ end local function destroy_session(session, err) + if session.destroyed then return; end (session.log or log)("debug", "Destroying session for %s (%s@%s)%s", session.full_jid or "(unknown)", session.username or "(unknown)", session.host or "(unknown)", err and (": "..err) or ""); - if session.destroyed then return; end - -- Remove session/resource from user's session list if session.full_jid then local host_session = hosts[session.host];