s2smanager: Include a stub thread on destroyed sessions (thanks Link Mauve)
authorKim Alvefur <zash@zash.se>
Thu, 9 Jun 2016 12:04:50 +0000 (14:04 +0200)
committerKim Alvefur <zash@zash.se>
Thu, 9 Jun 2016 12:04:50 +0000 (14:04 +0200)
core/s2smanager.lua

index a8d399d2761307a27c1d3893750238feb2ddbf1f..abeaa6465c8b568c2db53a998ff11470132b9ef6 100644 (file)
@@ -64,6 +64,7 @@ local function retire_session(session, reason)
 
        function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); 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 };
        session.sends2s = session.send;
        return setmetatable(session, resting_session);
 end