diff options
-rw-r--r-- | core/s2smanager.lua | 4 | ||||
-rw-r--r-- | core/sessionmanager.lua | 2 | ||||
-rw-r--r-- | net/xmppclient_listener.lua | 4 | ||||
-rw-r--r-- | net/xmppserver_listener.lua | 4 |
4 files changed, 6 insertions, 8 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua index afc4f145..1fc2715d 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -139,7 +139,7 @@ function streamopened(session, attr) send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.to_host }):top_tag()); if session.to_host and not hosts[session.to_host] then -- Attempting to connect to a host we don't serve - session:disconnect("host-unknown"); + session:close("host-unknown"); return; end elseif session.direction == "outgoing" then @@ -230,8 +230,6 @@ function destroy_session(session) hosts[session.from_host].s2sout[session.to_host] = nil; end - session.conn = nil; - session.disconnect = nil; for k in pairs(session) do if k ~= "trace" then session[k] = nil; diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua index 76461b8a..74edb86c 100644 --- a/core/sessionmanager.lua +++ b/core/sessionmanager.lua @@ -113,7 +113,7 @@ function streamopened(session, attr) if not hosts[session.host] then -- We don't serve this host... - session:disconnect{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; + session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; return; end diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua index e89a591e..0f5511b4 100644 --- a/net/xmppclient_listener.lua +++ b/net/xmppclient_listener.lua @@ -38,7 +38,7 @@ end local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'}; -local function session_disconnect(session, reason) +local function session_close(session, reason) local log = session.log or log; if session.conn then if reason then @@ -90,7 +90,7 @@ function xmppclient.listener(conn, data) print("Client connected"); session.reset_stream = session_reset_stream; - session.disconnect = session_disconnect; + session.close = session_close; session_reset_stream(session); -- Initialise, ready for use diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua index 4564eee1..3ba539e1 100644 --- a/net/xmppserver_listener.lua +++ b/net/xmppserver_listener.lua @@ -40,7 +40,7 @@ end local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'}; -local function session_disconnect(session, reason) +local function session_close(session, reason) local log = session.log or log; if session.conn then if reason then @@ -92,7 +92,7 @@ function xmppserver.listener(conn, data) print("Incoming s2s connection"); session.reset_stream = session_reset_stream; - session.disconnect = session_disconnect; + session.close = session_close; session_reset_stream(session); -- Initialise, ready for use |