Comparison

core/s2smanager.lua @ 1468:83b297a412a2

s2smanager: Log the hostname and address when s2s connection fails instantly
author Matthew Wild <mwild1@gmail.com>
date Fri, 03 Jul 2009 14:58:11 +0100
parent 1450:c1c7b27b983b
child 1492:aaeccebad0f3
comparison
equal deleted inserted replaced
1467:fc420e9585c2 1468:83b297a412a2
236 local conn, handler = socket.tcp() 236 local conn, handler = socket.tcp()
237 237
238 conn:settimeout(0); 238 conn:settimeout(0);
239 local success, err = conn:connect(connect_host, connect_port); 239 local success, err = conn:connect(connect_host, connect_port);
240 if not success and err ~= "timeout" then 240 if not success and err ~= "timeout" then
241 log("warn", "s2s connect() failed: %s", err); 241 log("warn", "s2s connect() to %s (%s:%d) failed: %s", host_session.to_host, connect_host, connect_port, err);
242 return false; 242 return false;
243 end 243 end
244 244
245 local cl = connlisteners_get("xmppserver"); 245 local cl = connlisteners_get("xmppserver");
246 conn = wrapclient(conn, connect_host, connect_port, cl, cl.default_mode or 1, hosts[from_host].ssl_ctx, false ); 246 conn = wrapclient(conn, connect_host, connect_port, cl, cl.default_mode or 1, hosts[from_host].ssl_ctx, false );