Software /
code /
prosody
Comparison
core/s2smanager.lua @ 6691:c6c996410064
s2smanager: Make sure destroyed sessions have a sends2s method
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 14 May 2015 00:22:13 +0200 |
parent | 5459:3a821511b9ec |
child | 6692:93eefa92527d |
comparison
equal
deleted
inserted
replaced
6684:53635a91c95c | 6691:c6c996410064 |
---|---|
62 | 62 |
63 session.destruction_reason = reason; | 63 session.destruction_reason = reason; |
64 | 64 |
65 function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); end | 65 function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); end |
66 function session.data(data) log("debug", "Discarding data received from resting session: %s", tostring(data)); end | 66 function session.data(data) log("debug", "Discarding data received from resting session: %s", tostring(data)); end |
67 session.sends2s = session.send; | |
67 return setmetatable(session, resting_session); | 68 return setmetatable(session, resting_session); |
68 end | 69 end |
69 | 70 |
70 function destroy_session(session, reason) | 71 function destroy_session(session, reason) |
71 if session.destroyed then return; end | 72 if session.destroyed then return; end |