Software /
code /
prosody
Comparison
plugins/s2s/mod_s2s.lua @ 4574:4c24bb949e73
Backed out changeset aba47e6dff43
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 24 Feb 2012 16:25:38 +0000 |
parent | 4572:aba47e6dff43 |
child | 4575:e0c4ac7749a6 |
comparison
equal
deleted
inserted
replaced
4572:aba47e6dff43 | 4574:4c24bb949e73 |
---|---|
245 (session.log or log)("debug", "Received </stream:stream>"); | 245 (session.log or log)("debug", "Received </stream:stream>"); |
246 session:close(); | 246 session:close(); |
247 end | 247 end |
248 | 248 |
249 function stream_callbacks.streamdisconnected(session, err) | 249 function stream_callbacks.streamdisconnected(session, err) |
250 if err and err ~= "stream closed" then | 250 if err and err ~= "closed" then |
251 (session.log or log)("debug", "s2s connection attempt failed: %s", err); | 251 (session.log or log)("debug", "s2s connection attempt failed: %s", err); |
252 if s2sout.attempt_connection(session, err) then | 252 if s2sout.attempt_connection(session, err) then |
253 (session.log or log)("debug", "...so we're going to try another target"); | 253 (session.log or log)("debug", "...so we're going to try another target"); |
254 return true; -- Session lives for now | 254 return true; -- Session lives for now |
255 end | 255 end |
256 end | 256 end |
257 (session.log or log)("info", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err or "closed")); | 257 (session.log or log)("info", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err or "closed")); |
258 if session.con then sessions[session.conn] = nil; else (session.log or log)("debug", "stale session's connection already closed"); end | 258 sessions[session.conn] = nil; |
259 s2s_destroy_session(session, err); | 259 s2s_destroy_session(session, err); |
260 end | 260 end |
261 | 261 |
262 function stream_callbacks.error(session, error, data) | 262 function stream_callbacks.error(session, error, data) |
263 if error == "no-stream" then | 263 if error == "no-stream" then |