Software /
code /
prosody
Diff
plugins/s2s/s2sout.lib.lua @ 4791:c01066f27a5d
s2sout.lib: Check whether lua-socket supports IPv6
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Sat, 28 Apr 2012 22:34:05 +0200 |
parent | 4756:f8ddaaa08a8e |
line wrap: on
line diff
--- a/plugins/s2s/s2sout.lib.lua Sat Apr 28 19:41:04 2012 +0100 +++ b/plugins/s2s/s2sout.lib.lua Sat Apr 28 22:34:05 2012 +0200 @@ -271,6 +271,10 @@ if connect_host.proto == "IPv4" then conn, handler = socket.tcp(); else + if not socket.tcp6 then + log("warn", "Could not connect to "..to_host..". Your version of lua-socket does not support IPv6"); + return false, "no-ipv6"; + end conn, handler = socket.tcp6(); end