Mercurial > prosody-hg
comparison core/s2smanager.lua @ 4262:fd4d1cf6d63e
s2smanager: Log reason when destroying a session.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Sat, 07 May 2011 21:15:13 +0500 |
| parents | fb487ee690ea |
| children | 332fc256c76e |
comparison
equal
deleted
inserted
replaced
| 4261:b980a4173c1a | 4262:fd4d1cf6d63e |
|---|---|
| 623 return setmetatable(session, resting_session); | 623 return setmetatable(session, resting_session); |
| 624 end | 624 end |
| 625 | 625 |
| 626 function destroy_session(session, reason) | 626 function destroy_session(session, reason) |
| 627 if session.destroyed then return; end | 627 if session.destroyed then return; end |
| 628 (session.log or log)("debug", "Destroying "..tostring(session.direction).." session "..tostring(session.from_host).."->"..tostring(session.to_host)); | 628 (session.log or log)("debug", "Destroying "..tostring(session.direction).." session "..tostring(session.from_host).."->"..tostring(session.to_host)..(reason and (": "..reason) or "")); |
| 629 | 629 |
| 630 if session.direction == "outgoing" then | 630 if session.direction == "outgoing" then |
| 631 hosts[session.from_host].s2sout[session.to_host] = nil; | 631 hosts[session.from_host].s2sout[session.to_host] = nil; |
| 632 bounce_sendq(session, reason); | 632 bounce_sendq(session, reason); |
| 633 elseif session.direction == "incoming" then | 633 elseif session.direction == "incoming" then |
