Software /
code /
prosody
Diff
plugins/mod_smacks.lua @ 12044:9eb1a178293e
mod_smacks: Patch various self-references on the resumed session
The number of places where the session is an upvalue to its own methods
is too high!
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 13 Dec 2021 21:46:49 +0100 |
parent | 12043:48f8fa6cea7b |
child | 12045:a6c821720cb6 |
line wrap: on
line diff
--- a/plugins/mod_smacks.lua Mon Dec 13 21:17:54 2021 +0100 +++ b/plugins/mod_smacks.lua Mon Dec 13 21:46:49 2021 +0100 @@ -571,11 +571,16 @@ local migrated_session_log = session.log; original_session.ip = session.ip; original_session.conn = session.conn; + original_session.rawsend = session.rawsend; + original_session.rawsend.session = original_session; + original_session.rawsend.conn = original_session.conn; original_session.send = session.send; + original_session.send.session = original_session; original_session.close = session.close; original_session.filter = session.filter; original_session.filter.session = original_session; original_session.filters = session.filters; + original_session.send.filter = original_session.filter; original_session.stream = session.stream; original_session.secure = session.secure; original_session.hibernating = nil;