# HG changeset patch # User Kim Alvefur # Date 1410386947 -7200 # Node ID 938cc782c14d4715922e9acb5844c1d3a58d1ba9 # Parent 166d1bd8fc38c32ee91bbab583c62bd2bb007dcb core.sessionmanager: Set a fake thread on destroyed sessions, fixes traceback if stanzas are emitted after a session is destroyed (thanks Sven Blumenstein) diff -r 166d1bd8fc38 -r 938cc782c14d core/sessionmanager.lua --- 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