Comparison

plugins/mod_s2s/s2sout.lib.lua @ 5798:c610b5fb53f3

mod_s2s/s2sout.lib: Improve error message logged at 'info' level when failing to connect to a host. Now 'Failed in all attempts to connect to XYZ'
author Matthew Wild <mwild1@gmail.com>
date Wed, 14 Aug 2013 00:18:39 +0100
parent 5776:bd0ff8ae98a8
child 5799:4a7e90b4c97d
comparison
equal deleted inserted replaced
5797:a493b79cfad0 5798:c610b5fb53f3
127 host_session.srv_choice = host_session.srv_choice + 1; 127 host_session.srv_choice = host_session.srv_choice + 1;
128 local srv_choice = host_session.srv_hosts[host_session.srv_choice]; 128 local srv_choice = host_session.srv_hosts[host_session.srv_choice];
129 connect_host, connect_port = srv_choice.target or to_host, srv_choice.port or connect_port; 129 connect_host, connect_port = srv_choice.target or to_host, srv_choice.port or connect_port;
130 host_session.log("info", "Connection failed (%s). Attempt #%d: This time to %s:%d", tostring(err), host_session.srv_choice, connect_host, connect_port); 130 host_session.log("info", "Connection failed (%s). Attempt #%d: This time to %s:%d", tostring(err), host_session.srv_choice, connect_host, connect_port);
131 else 131 else
132 host_session.log("info", "Out of connection options, can't connect to %s", tostring(host_session.to_host)); 132 host_session.log("info", "Failed in all attempts to connect to %s", tostring(host_session.to_host));
133 -- We're out of options 133 -- We're out of options
134 return false; 134 return false;
135 end 135 end
136 136
137 if not (connect_host and connect_port) then 137 if not (connect_host and connect_port) then