aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-04-15 15:12:35 +0200
committerKim Alvefur <zash@zash.se>2021-04-15 15:12:35 +0200
commit1e3a2509291232c261abf3f553ae75108f6bef06 (patch)
tree1ad9c12c8c51b0a8f736b7d9651082f0fac6a565 /core
parent21fa25b27b77a10ec6547adc2c16f66c48f1eb7f (diff)
downloadprosody-1e3a2509291232c261abf3f553ae75108f6bef06.tar.gz
prosody-1e3a2509291232c261abf3f553ae75108f6bef06.zip
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
Diffstat (limited to 'core')
-rw-r--r--core/sessionmanager.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index eb515819..7f296ff1 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -86,6 +86,7 @@ local function retire_session(session)
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);