mod_websocket: Multiple fixes for sending stream errors
authorFlorian Zeitz <florob@babelmonkeys.de>
Wed, 19 Mar 2014 20:11:58 +0100
changeset 1364 cc77341af5ee
parent 1363 478b3288192f
child 1365 ecc948f8d47d
mod_websocket: Multiple fixes for sending stream errors
mod_websocket/mod_websocket.lua
--- 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