Mercurial > prosody-modules
comparison mod_smacks/mod_smacks.lua @ 810:464ed063a8f2
mod_smacks: Less table indexing!
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 10 Sep 2012 21:02:26 +0200 |
| parents | 92c6f84ec446 |
| children | e2d940d81613 |
comparison
equal
deleted
inserted
replaced
| 809:1d51c5e38faa | 810:464ed063a8f2 |
|---|---|
| 222 session.log("debug", "mod_smacks hibernation timeout reached..."); | 222 session.log("debug", "mod_smacks hibernation timeout reached..."); |
| 223 -- We need to check the current resumption token for this resource | 223 -- We need to check the current resumption token for this resource |
| 224 -- matches the smacks session this timer is for in case it changed | 224 -- matches the smacks session this timer is for in case it changed |
| 225 -- (for example, the client may have bound a new resource and | 225 -- (for example, the client may have bound a new resource and |
| 226 -- started a new smacks session, or not be using smacks) | 226 -- started a new smacks session, or not be using smacks) |
| 227 local curr_session = hosts[session.host].sessions[session.username].sessions[session.resource]; | 227 local curr_session = full_sessions[session.full_jid]; |
| 228 if curr_session.resumption_token == resumption_token | 228 if curr_session.resumption_token == resumption_token |
| 229 -- Check the hibernate time still matches what we think it is, | 229 -- Check the hibernate time still matches what we think it is, |
| 230 -- otherwise the session resumed and re-hibernated. | 230 -- otherwise the session resumed and re-hibernated. |
| 231 and session.hibernating == hibernate_time then | 231 and session.hibernating == hibernate_time then |
| 232 session.log("debug", "Destroying session for hibernating too long"); | 232 session.log("debug", "Destroying session for hibernating too long"); |
