Comparison

plugins/mod_s2s/mod_s2s.lua @ 10513:7a82f7ecf0ce

mod_s2s: Remove obsolete pre-connect buffer Originally added in c500d4cb7855 Dead code since the net.connect switch in 756b8821007a
author Kim Alvefur <zash@zash.se>
date Tue, 17 Dec 2019 00:34:39 +0100
parent 10500:493cbfe99b64
child 10613:74d66b1be989
comparison
equal deleted inserted replaced
10512:3089086d31fa 10513:7a82f7ecf0ce
436 if check_cert_status(session) == false then 436 if check_cert_status(session) == false then
437 return; 437 return;
438 end 438 end
439 end 439 end
440 440
441 -- Send unauthed buffer
442 -- (stanzas which are fine to send before dialback)
443 -- Note that this is *not* the stanza queue (which
444 -- we can only send if auth succeeds) :)
445 local send_buffer = session.send_buffer;
446 if send_buffer and #send_buffer > 0 then
447 log("debug", "Sending s2s send_buffer now...");
448 for i, data in ipairs(send_buffer) do
449 session.sends2s(tostring(data));
450 send_buffer[i] = nil;
451 end
452 end
453 session.send_buffer = nil;
454
455 -- If server is pre-1.0, don't wait for features, just do dialback 441 -- If server is pre-1.0, don't wait for features, just do dialback
456 if session.version < 1.0 then 442 if session.version < 1.0 then
457 if not session.dialback_verifying then 443 if not session.dialback_verifying then
458 hosts[session.from_host].events.fire_event("s2sout-authenticate-legacy", { origin = session }); 444 hosts[session.from_host].events.fire_event("s2sout-authenticate-legacy", { origin = session });
459 else 445 else