0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-13 00:15:05 +01:00

modules/federation/sender: Query ircd::server for peer error before new node creation.

This commit is contained in:
Jason Volk 2018-03-14 15:53:09 -07:00
parent 67b2f13c64
commit 02b6df94f4

View file

@ -125,13 +125,20 @@ send(const m::event &event,
auto it{nodes.lower_bound(origin)};
if(it == end(nodes) || it->first != origin)
{
if(server::errmsg(origin))
return;
it = nodes.emplace_hint(it, origin, origin);
}
auto &node{it->second};
if(!unit)
unit = std::make_shared<struct unit>(event);
node.push(unit);
if(!node.flush())
nodes.erase(it);
});
}
@ -139,7 +146,6 @@ void
node::push(std::shared_ptr<unit> su)
{
q.emplace_back(std::move(su));
flush();
}
bool