diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/xmppclient_listener.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua index ad1fd948..e7a87c1e 100644 --- a/net/xmppclient_listener.lua +++ b/net/xmppclient_listener.lua @@ -29,9 +29,10 @@ local stream_callbacks = { stream_tag = "http://etherx.jabber.org/streams|stream function stream_callbacks.error(session, error, data) if error == "no-stream" then + session.log("debug", "Invalid opening stream header"); session:close("invalid-namespace"); - else - session.log("debug", "Client XML parse error: %s", tostring(error)); + elseif session.close then + (session.log or log)("debug", "Client XML parse error: %s", tostring(error)); session:close("xml-not-well-formed"); end end |