Software /
code /
prosody
Diff
core/s2smanager.lua @ 161:8c1a8a3e32e8
Destroy s2s sendqueue when connection is established successfully and data written
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 24 Oct 2008 15:32:31 +0100 |
parent | 157:f4e9b6ec34b0 |
child | 162:b1099bdd2724 |
line wrap: on
line diff
--- a/core/s2smanager.lua Fri Oct 24 15:20:34 2008 +0100 +++ b/core/s2smanager.lua Fri Oct 24 15:32:31 2008 +0100 @@ -171,10 +171,12 @@ local sendq, send = session.sendq, session.send; if sendq then session.log("debug", "sending queued stanzas across new connection"); - for _, data in ipairs(sendq) do + for i, data in ipairs(sendq) do session.log("debug", "sending: %s", tostring(data)); send(data); + sendq[i] = nil; end + session.sendq = nil; end end