Software /
code /
prosody
Comparison
net/xmppserver_listener.lua @ 2779:87b66be6d514
xmppserver_listener: Make log messages during SRV retries clearer
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 17 Dec 2009 19:01:57 +0000 |
parent | 2077:e33658f6052c |
child | 2782:71e6c13f6e08 |
comparison
equal
deleted
inserted
replaced
2778:d591e2c90807 | 2779:87b66be6d514 |
---|---|
150 | 150 |
151 function xmppserver.disconnect(conn, err) | 151 function xmppserver.disconnect(conn, err) |
152 local session = sessions[conn]; | 152 local session = sessions[conn]; |
153 if session then | 153 if session then |
154 if err and err ~= "closed" and session.srv_hosts then | 154 if err and err ~= "closed" and session.srv_hosts then |
155 (session.log or log)("debug", "s2s connection closed unexpectedly"); | 155 (session.log or log)("debug", "s2s connection attempt failed: %s", err); |
156 if s2s_attempt_connect(session, err) then | 156 if s2s_attempt_connect(session, err) then |
157 (session.log or log)("debug", "...so we're going to try again"); | 157 (session.log or log)("debug", "...so we're going to try another target"); |
158 return; -- Session lives for now | 158 return; -- Session lives for now |
159 end | 159 end |
160 end | 160 end |
161 (session.log or log)("info", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err)); | 161 (session.log or log)("info", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err)); |
162 s2s_destroy_session(session); | 162 s2s_destroy_session(session); |