Software /
code /
prosody
Comparison
core/sessionmanager.lua @ 11518:3f1a865e9419
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
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 15 Apr 2021 15:12:35 +0200 |
parent | 10642:de90b2f5da8c |
child | 12642:9061f9621330 |
child | 12877:f6cca7cbf3b2 |
comparison
equal
deleted
inserted
replaced
11517:f7275c2c58fa | 11518:3f1a865e9419 |
---|---|
84 session[k] = nil; | 84 session[k] = nil; |
85 end | 85 end |
86 end | 86 end |
87 | 87 |
88 function session.send(data) log("debug", "Discarding data sent to resting session: %s", data); return false; end | 88 function session.send(data) log("debug", "Discarding data sent to resting session: %s", data); return false; end |
89 function session.rawsend(data) log("debug", "Discarding data sent to resting session: %s", data); return false; end | |
89 function session.data(data) log("debug", "Discarding data received from resting session: %s", data); end | 90 function session.data(data) log("debug", "Discarding data received from resting session: %s", data); end |
90 session.thread = { run = function (_, data) return session.data(data) end }; | 91 session.thread = { run = function (_, data) return session.data(data) end }; |
91 return setmetatable(session, resting_session); | 92 return setmetatable(session, resting_session); |
92 end | 93 end |
93 | 94 |