Software /
code /
prosody
Changeset
3345:8520cd88b84c
xmpp{client,server}_listener: Convert some calls to tail calls for efficiency
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 09 Jul 2010 13:28:41 +0100 |
parents | 3344:b16f842b7525 |
children | 3346:c9294e190bb6 |
files | net/xmppclient_listener.lua net/xmppserver_listener.lua |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/net/xmppclient_listener.lua Fri Jul 09 13:22:58 2010 +0100 +++ b/net/xmppclient_listener.lua Fri Jul 09 13:28:41 2010 +0100 @@ -66,7 +66,7 @@ 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
--- a/net/xmppserver_listener.lua Fri Jul 09 13:22:58 2010 +0100 +++ b/net/xmppserver_listener.lua Fri Jul 09 13:28:41 2010 +0100 @@ -55,7 +55,7 @@ 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