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
commit3202bca036964aa4f92d9a80e07c974f64b64413 (patch)
treebc5701f34d8bc8fbba33c2187b0a84cc5797ce87 /core/sessionmanager.lua
parentccb4b3e4930cbcb860d80c4ed91e57cec36d2d30 (diff)
downloadprosody-3202bca036964aa4f92d9a80e07c974f64b64413.tar.gz
prosody-3202bca036964aa4f92d9a80e07c974f64b64413.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