aboutsummaryrefslogtreecommitdiffstats
path: root/core/sessionmanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-09-11 00:09:07 +0200
committerKim Alvefur <zash@zash.se>2014-09-11 00:09:07 +0200
commit7001d9fe0986a0287d4856f0085daf7d63415e5f (patch)
treebc5701f34d8bc8fbba33c2187b0a84cc5797ce87 /core/sessionmanager.lua
parent4faf29b1557d802ec5a79ae44503d53b63e3f03d (diff)
downloadprosody-7001d9fe0986a0287d4856f0085daf7d63415e5f.tar.gz
prosody-7001d9fe0986a0287d4856f0085daf7d63415e5f.zip
core.sessionmanager: Set a fake thread on destroyed sessions, fixes traceback if stanzas are emitted after a session is destroyed (thanks Sven Blumenstein)
Diffstat (limited to 'core/sessionmanager.lua')
-rw-r--r--core/sessionmanager.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index 5f7f688e..65e5156c 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -67,6 +67,7 @@ function retire_session(session)
function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); return false; end
function session.data(data) log("debug", "Discarding data received from resting session: %s", tostring(data)); end
+ session.thread = { run = function (_, data) return session.data(data) end };
return setmetatable(session, resting_session);
end