mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
Destroy s2s sendqueue when connection is established successfully and data written
This commit is contained in:
parent
ccbb4246ed
commit
b3d6f36fb1
1 changed files with 3 additions and 1 deletions
|
@ -171,10 +171,12 @@ function mark_connected(session)
|
||||||
local sendq, send = session.sendq, session.send;
|
local sendq, send = session.sendq, session.send;
|
||||||
if sendq then
|
if sendq then
|
||||||
session.log("debug", "sending queued stanzas across new connection");
|
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));
|
session.log("debug", "sending: %s", tostring(data));
|
||||||
send(data);
|
send(data);
|
||||||
|
sendq[i] = nil;
|
||||||
end
|
end
|
||||||
|
session.sendq = nil;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue