Changeset

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 4261:b980a4173c1a
children 4263:618e2a2b2d2c
files core/s2smanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;