net/xmppserver_listener.lua

changeset 974
82f7261c0482
parent 900
686e3e4a7e15
child 990
235abebc896e
equal deleted inserted replaced
973:b091a1a7273b 974:82f7261c0482
129 129
130 function xmppserver.disconnect(conn, err) 130 function xmppserver.disconnect(conn, err)
131 local session = sessions[conn]; 131 local session = sessions[conn];
132 if session then 132 if session then
133 if err and err ~= "closed" and session.srv_hosts then 133 if err and err ~= "closed" and session.srv_hosts then
134 (session.log or log)("debug", "s2s connection closed unexpectedly");
134 if s2s_attempt_connect(session, err) then 135 if s2s_attempt_connect(session, err) then
136 (session.log or log)("debug", "...so we're going to try again");
135 return; -- Session lives for now 137 return; -- Session lives for now
136 end 138 end
137 end 139 end
138 (session.log or log)("info", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err)); 140 (session.log or log)("info", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err));
139 s2s_destroy_session(session); 141 s2s_destroy_session(session);

mercurial