Comparison

plugins/mod_s2s/s2sout.lib.lua @ 9413:127208a6107c

mod_s2s: Silence luacheck warnings in s2sout module
author Kim Alvefur <zash@zash.se>
date Sun, 30 Sep 2018 17:52:30 +0200
parent 8911:cea6165a03d0
child 9414:a48579a7b709
comparison
equal deleted inserted replaced
9412:063977461363 9413:127208a6107c
5 -- This project is MIT/X11 licensed. Please see the 5 -- This project is MIT/X11 licensed. Please see the
6 -- COPYING file in the source package for more information. 6 -- COPYING file in the source package for more information.
7 -- 7 --
8 8
9 --- Module containing all the logic for connecting to a remote server 9 --- Module containing all the logic for connecting to a remote server
10
11 -- luacheck: ignore 432/err
10 12
11 local portmanager = require "core.portmanager"; 13 local portmanager = require "core.portmanager";
12 local wrapclient = require "net.server".wrapclient; 14 local wrapclient = require "net.server".wrapclient;
13 local initialize_filters = require "util.filters".initialize; 15 local initialize_filters = require "util.filters".initialize;
14 local idna_to_ascii = require "util.encodings".idna.to_ascii; 16 local idna_to_ascii = require "util.encodings".idna.to_ascii;
15 local new_ip = require "util.ip".new_ip; 17 local new_ip = require "util.ip".new_ip;
16 local rfc6724_dest = require "util.rfc6724".destination; 18 local rfc6724_dest = require "util.rfc6724".destination;
17 local socket = require "socket"; 19 local socket = require "socket";
18 local adns = require "net.adns"; 20 local adns = require "net.adns";
19 local dns = require "net.dns";
20 local t_insert, t_sort, ipairs = table.insert, table.sort, ipairs; 21 local t_insert, t_sort, ipairs = table.insert, table.sort, ipairs;
21 local local_addresses = require "util.net".local_addresses; 22 local local_addresses = require "util.net".local_addresses;
22 23
23 local s2s_destroy_session = require "core.s2smanager".destroy_session; 24 local s2s_destroy_session = require "core.s2smanager".destroy_session;
24 25
172 local log = host_session.log or log; 173 local log = host_session.log or log;
173 174
174 if not err then 175 if not err then
175 local IPs = {}; 176 local IPs = {};
176 host_session.ip_hosts = IPs; 177 host_session.ip_hosts = IPs;
178 :make
177 local handle4, handle6; 179 local handle4, handle6;
178 local have_other_result = not(has_ipv4) or not(has_ipv6) or false; 180 local have_other_result = not(has_ipv4) or not(has_ipv6) or false;
179 181
180 if has_ipv4 then 182 if has_ipv4 then
181 handle4 = host_session.resolver:lookup(function (reply, err) 183 handle4 = host_session.resolver:lookup(function (reply, err)