Software /
code /
prosody
Comparison
plugins/mod_smacks.lua @ 12038:4e54334febc1
mod_smacks: Include reason for destroying session on hibernation timeout
To aid in debugging
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 12 Dec 2021 18:38:40 +0100 |
parent | 11997:1ea01660c79a |
child | 12041:def20683c161 |
comparison
equal
deleted
inserted
replaced
12037:82f6a0b0a425 | 12038:4e54334febc1 |
---|---|
496 -- save only actual h value and username/host (for security) | 496 -- save only actual h value and username/host (for security) |
497 old_session_registry.set(session.username, session.resumption_token, { | 497 old_session_registry.set(session.username, session.resumption_token, { |
498 h = session.handled_stanza_count, | 498 h = session.handled_stanza_count, |
499 }); | 499 }); |
500 session.resumption_token = nil; | 500 session.resumption_token = nil; |
501 sessionmanager.destroy_session(session); | 501 sessionmanager.destroy_session(session, "Hibernating too long"); |
502 else | 502 else |
503 session.log("debug", "Session resumed before hibernation timeout, all is well") | 503 session.log("debug", "Session resumed before hibernation timeout, all is well") |
504 end | 504 end |
505 end); | 505 end); |
506 if session.conn then | 506 if session.conn then |