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:
parent
67b2f13c64
commit
02b6df94f4
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue