diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-07-28 19:17:09 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-07-28 19:17:09 +0100 |
commit | 5dfe9cf891dc5becd805dfbad79653d9eb840001 (patch) | |
tree | f64c675fbbac1f4acbcc959d820ddba16fd57a06 /net/xmppcomponent_listener.lua | |
parent | 39e1b4b1df2c49739e89b80f4b4351a4e6b20f81 (diff) | |
parent | 8ad65c2824d2ee3bd52175df34fdd7bd9d393231 (diff) | |
download | prosody-5dfe9cf891dc5becd805dfbad79653d9eb840001.tar.gz prosody-5dfe9cf891dc5becd805dfbad79653d9eb840001.zip |
Merge with 0.5
Diffstat (limited to 'net/xmppcomponent_listener.lua')
-rw-r--r-- | net/xmppcomponent_listener.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/xmppcomponent_listener.lua b/net/xmppcomponent_listener.lua index e62bb810..36d74579 100644 --- a/net/xmppcomponent_listener.lua +++ b/net/xmppcomponent_listener.lua @@ -87,9 +87,14 @@ end --- Closing a component connection local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'}; +local default_stream_attr = { ["xmlns:stream"] = stream_callbacks.stream_tag:gsub("%|[^|]+$", ""), xmlns = stream_callbacks.default_ns, version = "1.0", id = "" }; local function session_close(session, reason) local log = session.log or log; if session.conn then + if session.notopen then + session.send("<?xml version='1.0'?>"); + session.send(st.stanza("stream:stream", default_stream_attr):top_tag()); + end if reason then if type(reason) == "string" then -- assume stream error log("info", "Disconnecting component, <stream:error> is: %s", reason); |