Software /
code /
prosody
Comparison
core/sessionmanager.lua @ 7284:9434a220e549
mod_c2s: Remove use of util.async
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 17 Mar 2016 12:47:24 +0100 |
parent | 6916:d0ab0069145f |
child | 7286:30b9433a9f3e |
child | 7496:98c8d14be4ef |
comparison
equal
deleted
inserted
replaced
7283:32754b15b28a | 7284:9434a220e549 |
---|---|
70 end | 70 end |
71 end | 71 end |
72 | 72 |
73 function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); return false; end | 73 function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); return false; end |
74 function session.data(data) log("debug", "Discarding data received from resting session: %s", tostring(data)); end | 74 function session.data(data) log("debug", "Discarding data received from resting session: %s", tostring(data)); end |
75 session.thread = { run = function (_, data) return session.data(data) end }; | |
76 return setmetatable(session, resting_session); | 75 return setmetatable(session, resting_session); |
77 end | 76 end |
78 | 77 |
79 local function destroy_session(session, err) | 78 local function destroy_session(session, err) |
80 (session.log or log)("debug", "Destroying session for %s (%s@%s)%s", session.full_jid or "(unknown)", session.username or "(unknown)", session.host or "(unknown)", err and (": "..err) or ""); | 79 (session.log or log)("debug", "Destroying session for %s (%s@%s)%s", session.full_jid or "(unknown)", session.username or "(unknown)", session.host or "(unknown)", err and (": "..err) or ""); |