# HG changeset patch # User Florian Zeitz # Date 1395256318 -3600 # Node ID cc77341af5eef227f0d92c5f829bb2af1e40e6fa # Parent 478b3288192f0e9d8856e953ad93ba2afb1653be mod_websocket: Multiple fixes for sending stream errors diff -r 478b3288192f -r cc77341af5ee 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, is: %s", stream_error); + log("debug", "Disconnecting client, is: %s", tostring(stream_error)); session.send(stream_error); end