Software /
code /
prosody
Comparison
core/sessionmanager.lua @ 4961:29b24a4028ed
sessionmanager: Have session.send() of a retired session return false to indicate failure
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 22 Jul 2012 16:50:14 +0100 |
parent | 4813:77da9671ac39 |
child | 4981:95c18750b89e |
comparison
equal
deleted
inserted
replaced
4960:8950510ddb2e | 4961:29b24a4028ed |
---|---|
80 if k ~= "trace" and k ~= "log" and k ~= "id" then | 80 if k ~= "trace" and k ~= "log" and k ~= "id" then |
81 session[k] = nil; | 81 session[k] = nil; |
82 end | 82 end |
83 end | 83 end |
84 | 84 |
85 function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); end | 85 function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); return false; end |
86 function session.data(data) log("debug", "Discarding data received from resting session: %s", tostring(data)); end | 86 function session.data(data) log("debug", "Discarding data received from resting session: %s", tostring(data)); end |
87 return setmetatable(session, resting_session); | 87 return setmetatable(session, resting_session); |
88 end | 88 end |
89 | 89 |
90 function destroy_session(session, err) | 90 function destroy_session(session, err) |