Changeset

318:cc20ea4a8697

Fix logging in some cases for client disconnects
author Matthew Wild <mwild1@gmail.com>
date Sun, 16 Nov 2008 00:27:40 +0000
parents 316:13e2bd256a20
children 319:4a8a949c3870
files net/xmppclient_listener.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/xmppclient_listener.lua	Sun Nov 16 05:03:21 2008 +0500
+++ b/net/xmppclient_listener.lua	Sun Nov 16 00:27:40 2008 +0000
@@ -82,7 +82,7 @@
 			pres:tag("status"):text("Disconnected: "..err);
 			session.stanza_dispatch(pres);
 		end
-		session.log("info", "Client disconnected: %s", err);
+		(session.log or log)("info", "Client disconnected: %s", err);
 		sm_destroy_session(session);
 		sessions[conn]  = nil;
 		session = nil;