Diff

mod_websocket/mod_websocket.lua @ 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
parent 1340:3ffd64b4ab59
child 1397:4e36b68d68da
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