Changeset

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
parents 4790:8bf710b19f65
children 4792:bf107d9d4962
files plugins/s2s/s2sout.lib.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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