s2smanager: Include a stub thread on destroyed sessions (thanks Link Mauve)
authorKim Alvefur <zash@zash.se>
Thu, 09 Jun 2016 14:04:50 +0200
changeset 7455 d916703d5e18
parent 7454 464a8a8de625
child 7459 76a8456cf1e2
s2smanager: Include a stub thread on destroyed sessions (thanks Link Mauve)
core/s2smanager.lua
--- a/core/s2smanager.lua	Mon May 30 13:36:43 2016 +0200
+++ b/core/s2smanager.lua	Thu Jun 09 14:04:50 2016 +0200
@@ -64,6 +64,7 @@
 
 	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