net/xmppcomponent_listener.lua

changeset 2757
c13816e0c546
parent 2756
d81af905ccce
child 2758
0476a662dacc
equal deleted inserted replaced
2756:d81af905ccce 2757:c13816e0c546
104 104
105 --- Closing a component connection 105 --- Closing a component connection
106 local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'}; 106 local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'};
107 local default_stream_attr = { ["xmlns:stream"] = "http://etherx.jabber.org/streams", xmlns = stream_callbacks.default_ns, version = "1.0", id = "" }; 107 local default_stream_attr = { ["xmlns:stream"] = "http://etherx.jabber.org/streams", xmlns = stream_callbacks.default_ns, version = "1.0", id = "" };
108 local function session_close(session, reason) 108 local function session_close(session, reason)
109 if session.destroyed then return; end
109 local log = session.log or log; 110 local log = session.log or log;
110 if session.conn then 111 if session.conn then
111 if session.notopen then 112 if session.notopen then
112 session.send("<?xml version='1.0'?>"); 113 session.send("<?xml version='1.0'?>");
113 session.send(st.stanza("stream:stream", default_stream_attr):top_tag()); 114 session.send(st.stanza("stream:stream", default_stream_attr):top_tag());

mercurial