diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-01-24 13:49:33 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-01-24 13:49:33 +0000 |
commit | 6ab4b844637e4a558acca967b601cdbb909d5f99 (patch) | |
tree | f309704e34652a27725a713ac9c4adafb7e38d3a /plugins/mod_s2s/mod_s2s.lua | |
parent | 4fe8de2434041a7105fe0a10c3f1b408f864cba2 (diff) | |
download | prosody-6ab4b844637e4a558acca967b601cdbb909d5f99.tar.gz prosody-6ab4b844637e4a558acca967b601cdbb909d5f99.zip |
mod_s2s: Pass use_ipv4/ipv6 from config to connector config
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 00d8f5d9..2d45c750 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -27,7 +27,7 @@ local s2s_destroy_session = require "core.s2smanager".destroy_session; local uuid_gen = require "util.uuid".generate; local fire_global_event = prosody.events.fire_event; local runner = require "util.async".runner; -local connect = require "net.connect".connect; +local new_connector = require "net.connect".new_connector; local service = require "net.resolvers.service"; local errors = require "util.error"; local set = require "util.set"; @@ -51,6 +51,11 @@ local listener = {}; local log = module._log; +local connect = new_connector({ + use_ipv4 = module:get_option_boolean("use_ipv4", true); + use_ipv6 = module:get_option_boolean("use_ipv6", true); +}); + module:hook("stats-update", function () local count = 0; local ipv6 = 0; |