# HG changeset patch # User Florian Zeitz # Date 1335645245 -7200 # Node ID c01066f27a5d5779814966b39542f21e43488c7d # Parent 8bf710b19f65231b2a1924e5555e43c4084ca32b s2sout.lib: Check whether lua-socket supports IPv6 diff -r 8bf710b19f65 -r c01066f27a5d plugins/s2s/s2sout.lib.lua --- 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