s2smanager: Don't attempt to connect to a nil host (for whatever reason... invalid DNS record perhaps?) (thanks dersd)

Fri, 02 Jul 2010 17:22:23 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 02 Jul 2010 17:22:23 +0100
changeset 3309
1c58cb93ef3e
parent 3304
fec74b84df61
child 3310
ddcab5be2a5e

s2smanager: Don't attempt to connect to a nil host (for whatever reason... invalid DNS record perhaps?) (thanks dersd)

core/s2smanager.lua file | annotate | diff | comparison | revisions
--- a/core/s2smanager.lua	Tue Jun 29 20:23:11 2010 +0100
+++ b/core/s2smanager.lua	Fri Jul 02 17:22:23 2010 +0100
@@ -193,7 +193,7 @@
 
 function attempt_connection(host_session, err)
 	local from_host, to_host = host_session.from_host, host_session.to_host;
-	local connect_host, connect_port = idna_to_ascii(to_host), 5269;
+	local connect_host, connect_port = to_host and idna_to_ascii(to_host), 5269;
 	
 	if not connect_host then
 		return false;

mercurial