session:disconnect() -> session:close() for consistency with other Lua APIs

This commit is contained in:
Matthew Wild 2008-11-18 19:44:54 +00:00
parent 64e57b5001
commit 99b617b8b6
4 changed files with 6 additions and 8 deletions

View file

@ -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

View file

@ -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