Changeset

1364:cc77341af5ee

mod_websocket: Multiple fixes for sending stream errors
author Florian Zeitz <florob@babelmonkeys.de>
date Wed, 19 Mar 2014 20:11:58 +0100
parents 1363:478b3288192f
children 1365:ecc948f8d47d
files mod_websocket/mod_websocket.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_websocket/mod_websocket.lua	Wed Mar 19 19:51:57 2014 +0100
+++ b/mod_websocket/mod_websocket.lua	Wed Mar 19 20:11:58 2014 +0100
@@ -45,6 +45,7 @@
 local xmlns_framing = "urn:ietf:params:xml:ns:xmpp-framing";
 local xmlns_streams = "http://etherx.jabber.org/streams";
 local xmlns_client = "jabber:client";
+local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'};
 
 module:depends("c2s")
 local sessions = module:shared("c2s/sessions");
@@ -170,8 +171,7 @@
 					stream_error = reason;
 				end
 			end
-			stream_error = tostring(stream_error);
-			log("debug", "Disconnecting client, <stream:error> is: %s", stream_error);
+			log("debug", "Disconnecting client, <stream:error> is: %s", tostring(stream_error));
 			session.send(stream_error);
 		end