Software /
code /
prosody
Diff
core/sessionmanager.lua @ 6404:938cc782c14d
core.sessionmanager: Set a fake thread on destroyed sessions, fixes traceback if stanzas are emitted after a session is destroyed (thanks Sven Blumenstein)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 11 Sep 2014 00:09:07 +0200 |
parent | 5776:bd0ff8ae98a8 |
child | 6551:784fa05cf594 |
line wrap: on
line diff
--- a/core/sessionmanager.lua Tue Sep 09 15:05:46 2014 +0200 +++ b/core/sessionmanager.lua Thu Sep 11 00:09:07 2014 +0200 @@ -67,6 +67,7 @@ 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