# HG changeset patch # User Matthew Wild # Date 1579873773 0 # Node ID 74d66b1be989908dd3b456a406bd5f6a8e93ccc4 # Parent 44ef46e1a95137356c1b94747f5bc394432b3413 mod_s2s: Pass use_ipv4/ipv6 from config to connector config diff -r 44ef46e1a951 -r 74d66b1be989 plugins/mod_s2s/mod_s2s.lua --- a/plugins/mod_s2s/mod_s2s.lua Fri Jan 24 13:48:49 2020 +0000 +++ b/plugins/mod_s2s/mod_s2s.lua Fri Jan 24 13:49:33 2020 +0000 @@ -27,7 +27,7 @@ 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 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;