From 12c59fd50ce83f4c16184c9802d40626843cc48e Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 6 Apr 2009 23:43:48 +0100 Subject: core.s2smanager: Check for valid host and port before attempting connection --- core/s2smanager.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core') diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 4c758159..158536d8 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -177,6 +177,11 @@ function attempt_connection(host_session, err) return false; end + if not (connect_host and connect_port) then + -- Likely we couldn't resolve DNS + return false; + end + -- Ok, we're going to try to connect conn:settimeout(0); local success, err = conn:connect(connect_host, connect_port); -- cgit v1.2.3