Comparison

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
comparison
equal deleted inserted replaced
12043:48f8fa6cea7b 12044:9eb1a178293e
569 conn:close(); 569 conn:close();
570 end 570 end
571 local migrated_session_log = session.log; 571 local migrated_session_log = session.log;
572 original_session.ip = session.ip; 572 original_session.ip = session.ip;
573 original_session.conn = session.conn; 573 original_session.conn = session.conn;
574 original_session.rawsend = session.rawsend;
575 original_session.rawsend.session = original_session;
576 original_session.rawsend.conn = original_session.conn;
574 original_session.send = session.send; 577 original_session.send = session.send;
578 original_session.send.session = original_session;
575 original_session.close = session.close; 579 original_session.close = session.close;
576 original_session.filter = session.filter; 580 original_session.filter = session.filter;
577 original_session.filter.session = original_session; 581 original_session.filter.session = original_session;
578 original_session.filters = session.filters; 582 original_session.filters = session.filters;
583 original_session.send.filter = original_session.filter;
579 original_session.stream = session.stream; 584 original_session.stream = session.stream;
580 original_session.secure = session.secure; 585 original_session.secure = session.secure;
581 original_session.hibernating = nil; 586 original_session.hibernating = nil;
582 session.log = original_session.log; 587 session.log = original_session.log;
583 session.type = original_session.type; 588 session.type = original_session.type;