Changeset

4263:618e2a2b2d2c

sessionmanager: Log reason when destroying a session.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 07 May 2011 21:15:34 +0500
parents 4262:fd4d1cf6d63e
children 4264:fa36e749749c
files core/sessionmanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/sessionmanager.lua	Sat May 07 21:15:13 2011 +0500
+++ b/core/sessionmanager.lua	Sat May 07 21:15:34 2011 +0500
@@ -103,7 +103,7 @@
 end
 
 function destroy_session(session, err)
-	(session.log or log)("info", "Destroying session for %s (%s@%s)", session.full_jid or "(unknown)", session.username or "(unknown)", session.host or "(unknown)");
+	(session.log or log)("info", "Destroying session for %s (%s@%s)%s", session.full_jid or "(unknown)", session.username or "(unknown)", session.host or "(unknown)", err and (": "..err) or "");
 	if session.destroyed then return; end
 	
 	-- Remove session/resource from user's session list