Software /
code /
prosody
Comparison
plugins/s2s/mod_s2s.lua @ 4593:470f502f02a3
Merge with Maranda
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 08 Mar 2012 00:18:16 +0000 |
parent | 4591:75b3d0c301d0 |
parent | 4592:0a9528b178fd |
child | 4601:4007b9f9aa5f |
comparison
equal
deleted
inserted
replaced
4591:75b3d0c301d0 | 4593:470f502f02a3 |
---|---|
278 (session.log or log)("debug", "...so we're going to try another target"); | 278 (session.log or log)("debug", "...so we're going to try another target"); |
279 return true; -- Session lives for now | 279 return true; -- Session lives for now |
280 end | 280 end |
281 end | 281 end |
282 (session.log or log)("info", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err or "closed")); | 282 (session.log or log)("info", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err or "closed")); |
283 sessions[session.conn] = nil; | |
284 s2s_destroy_session(session, err); | 283 s2s_destroy_session(session, err); |
285 end | 284 end |
286 | 285 |
287 function stream_callbacks.error(session, error, data) | 286 function stream_callbacks.error(session, error, data) |
288 if error == "no-stream" then | 287 if error == "no-stream" then |
455 if session then | 454 if session then |
456 if stream_callbacks.streamdisconnected(session, err) then | 455 if stream_callbacks.streamdisconnected(session, err) then |
457 return; -- Connection lives, for now | 456 return; -- Connection lives, for now |
458 end | 457 end |
459 end | 458 end |
460 sessions[conn] = nil; | 459 sessions[conn] = nil; |
461 end | 460 end |
462 | 461 |
463 function listener.register_outgoing(conn, session) | 462 function listener.register_outgoing(conn, session) |
464 session.direction = "outgoing"; | 463 session.direction = "outgoing"; |
465 sessions[conn] = session; | 464 sessions[conn] = session; |