Changeset

4473:7e2cf20aef74

xmppserver_listener: Only re-attempt connection on disconnect if it was an unauthenticated s2sout (thanks Medics for the log)
author Matthew Wild <mwild1@gmail.com>
date Tue, 17 Jan 2012 17:56:36 +0000
parents 4472:9a4a82629bf3
children 4474:b08a46cf06e6 4475:7341cc5c8da9
files net/xmppserver_listener.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/xmppserver_listener.lua	Tue Jan 17 00:31:30 2012 +0000
+++ b/net/xmppserver_listener.lua	Tue Jan 17 17:56:36 2012 +0000
@@ -178,7 +178,7 @@
 function xmppserver.ondisconnect(conn, err)
 	local session = sessions[conn];
 	if session then
-		if err and err ~= "closed" then
+		if err and err ~= "closed"  and session.type == "s2sout_unauthed" then
 			(session.log or log)("debug", "s2s connection attempt failed: %s", err);
 			if s2s_attempt_connect(session, err) then
 				(session.log or log)("debug", "...so we're going to try another target");