aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-10-24 15:32:31 +0100
committerMatthew Wild <mwild1@gmail.com>2008-10-24 15:32:31 +0100
commitb3d6f36fb15531b98641f72bef4f3ed9ebb29471 (patch)
treea9ff8a2d4b2a6f29ce333869e8d35b6975559045 /core/s2smanager.lua
parentccbb4246ed6c3b136b8e9f38724576dd24f7d23a (diff)
downloadprosody-b3d6f36fb15531b98641f72bef4f3ed9ebb29471.tar.gz
prosody-b3d6f36fb15531b98641f72bef4f3ed9ebb29471.zip
Destroy s2s sendqueue when connection is established successfully and data written
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index c2df2020..be5b8243 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -171,10 +171,12 @@ function mark_connected(session)
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