# HG changeset patch # User Kim Alvefur # Date 1687592943 -7200 # Node ID 4e67d34c12987d7fda138e57a81464806c7f3467 # Parent 75e8ca1311780cf9a9580cc9d07c83d40bbac5a7 clix: Remove Tigase COMPAT The bufferlen method is specific to server_select, so this breaks on server_epoll diff -r 75e8ca131178 -r 4e67d34c1298 clix.lua --- a/clix.lua Fri May 26 22:39:38 2023 +0200 +++ b/clix.lua Sat Jun 24 09:49:03 2023 +0200 @@ -129,36 +129,6 @@ -- Connect! conn:connect_client(account.jid, account.password, clientkey, serverkey); - - -- COMPAT: Tigase discards stanzas sent at the same time as - local _real_close = conn.close; - function conn:close() - conn:debug("Delaying close..."); - local function close_conn() - local function do_close() - if _real_close then - conn:debug("Closing now..."); - local close = _real_close; - _real_close = nil; - close(conn); - end - end - local close_delay = tonumber(opts.close_delay) or 0; - if close_delay > 0 then - verse.add_task(close_delay, do_close); - else - do_close(); - end - end - if conn.conn:bufferlen() == 0 then - close_conn(); - else - conn:hook("drained", close_conn); - end - end - -- /COMPAT - - if type(opts.resource) == "string" then conn.resource = opts.resource; end