diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-07-09 13:28:41 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-07-09 13:28:41 +0100 |
commit | 91a3910031a0115f6cd027706a77c5cb909157b7 (patch) | |
tree | 0a97111c2e465179dced3da3b57651c25afdc722 /net | |
parent | ad5b4ee77f2a4a3b6510d420866c1f8c00d8f855 (diff) | |
download | prosody-91a3910031a0115f6cd027706a77c5cb909157b7.tar.gz prosody-91a3910031a0115f6cd027706a77c5cb909157b7.zip |
xmpp{client,server}_listener: Convert some calls to tail calls for efficiency
Diffstat (limited to 'net')
-rw-r--r-- | net/xmppclient_listener.lua | 2 | ||||
-rw-r--r-- | net/xmppserver_listener.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua index a7da6d22..75726972 100644 --- a/net/xmppclient_listener.lua +++ b/net/xmppclient_listener.lua @@ -66,7 +66,7 @@ local function handleerr(err) log("error", "Traceback[c2s]: %s: %s", tostring(er function stream_callbacks.handlestanza(session, stanza) stanza = session.filter("stanzas/in", stanza); if stanza then - xpcall(function () core_process_stanza(session, stanza) end, handleerr); + return xpcall(function () return core_process_stanza(session, stanza) end, handleerr); end end diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua index d4283d9b..05e14a0f 100644 --- a/net/xmppserver_listener.lua +++ b/net/xmppserver_listener.lua @@ -55,7 +55,7 @@ function stream_callbacks.handlestanza(session, stanza) end stanza = session.filter("stanzas/in", stanza); if stanza then - xpcall(function () core_process_stanza(session, stanza) end, handleerr); + return xpcall(function () return core_process_stanza(session, stanza) end, handleerr); end end |