core.sessionmanager: Add a dummy rawsend() method to resting sessions
authorKim Alvefur <zash@zash.se>
Thu, 15 Apr 2021 15:12:35 +0200
changeset 11522 3f1a865e9419
parent 11521 f7275c2c58fa
child 11523 df4bd3af4099
core.sessionmanager: Add a dummy rawsend() method to resting sessions Should fix a traceback on attempted use after destruction, in case where opportunistic_writes was in use. Thanks Ge0rG
core/sessionmanager.lua
--- a/core/sessionmanager.lua	Wed Apr 14 16:02:47 2021 +0200
+++ b/core/sessionmanager.lua	Thu Apr 15 15:12:35 2021 +0200
@@ -86,6 +86,7 @@
 	end
 
 	function session.send(data) log("debug", "Discarding data sent to resting session: %s", data); return false; end
+	function session.rawsend(data) log("debug", "Discarding data sent to resting session: %s", data); return false; end
 	function session.data(data) log("debug", "Discarding data received from resting session: %s", data); end
 	session.thread = { run = function (_, data) return session.data(data) end };
 	return setmetatable(session, resting_session);