s2smanager: Log reason when destroying a session.
--- a/core/s2smanager.lua Wed May 04 23:13:50 2011 +0100
+++ b/core/s2smanager.lua Sat May 07 21:15:13 2011 +0500
@@ -625,7 +625,7 @@
function destroy_session(session, reason)
if session.destroyed then return; end
- (session.log or log)("debug", "Destroying "..tostring(session.direction).." session "..tostring(session.from_host).."->"..tostring(session.to_host));
+ (session.log or log)("debug", "Destroying "..tostring(session.direction).." session "..tostring(session.from_host).."->"..tostring(session.to_host)..(reason and (": "..reason) or ""));
if session.direction == "outgoing" then
hosts[session.from_host].s2sout[session.to_host] = nil;