Mercurial > prosody-hg
comparison plugins/mod_s2s/mod_s2s.lua @ 7642:2dcb402c4a0d
Backed out changeset a23b5cb8c22b
It was a nice idea, but our s2s connection logic is too complicated. The
session may have been destroyed inside attempt_connection().
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 31 Aug 2016 11:42:03 +0100 |
| parents | a23b5cb8c22b |
| children | e9d7a409e236 946871f6e3c8 |
comparison
equal
deleted
inserted
replaced
| 7638:a23b5cb8c22b | 7642:2dcb402c4a0d |
|---|---|
| 632 if err and session.direction == "outgoing" and session.notopen then | 632 if err and session.direction == "outgoing" and session.notopen then |
| 633 (session.log or log)("debug", "s2s connection attempt failed: %s", err); | 633 (session.log or log)("debug", "s2s connection attempt failed: %s", err); |
| 634 if s2sout.attempt_connection(session, err) then | 634 if s2sout.attempt_connection(session, err) then |
| 635 return; -- Session lives for now | 635 return; -- Session lives for now |
| 636 end | 636 end |
| 637 hosts[session.from_host].events.fire_event("s2s-connect-failure", { session = session, err = err }); | |
| 638 end | 637 end |
| 639 (session.log or log)("debug", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err or "connection closed")); | 638 (session.log or log)("debug", "s2s disconnected: %s->%s (%s)", tostring(session.from_host), tostring(session.to_host), tostring(err or "connection closed")); |
| 640 s2s_destroy_session(session, err); | 639 s2s_destroy_session(session, err); |
| 641 end | 640 end |
| 642 end | 641 end |
