mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 00:32:35 +01:00
ircd::server: Additional assertions.
This commit is contained in:
parent
8d91c90574
commit
6488141f64
1 changed files with 6 additions and 0 deletions
|
@ -367,6 +367,7 @@ void
|
|||
ircd::server::peer::close(const net::close_opts &opts)
|
||||
{
|
||||
op_fini = true;
|
||||
assert(!op_resolve);
|
||||
std::vector<link *> links(this->links.size());
|
||||
pointers(this->links, links);
|
||||
for(const auto &link : links)
|
||||
|
@ -577,7 +578,10 @@ ircd::server::peer::link_add(const size_t &num)
|
|||
assert(!finished());
|
||||
|
||||
if(e)
|
||||
{
|
||||
std::rethrow_exception(e->eptr);
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
assert(!op_fini);
|
||||
links.emplace_back(*this);
|
||||
|
@ -856,12 +860,14 @@ ircd::server::peer::handle_resolve(std::exception_ptr eptr,
|
|||
const ipport &ipport)
|
||||
try
|
||||
{
|
||||
assert(op_resolve);
|
||||
op_resolve = false;
|
||||
|
||||
if(eptr)
|
||||
{
|
||||
err_set(eptr);
|
||||
std::rethrow_exception(eptr);
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
this->remote = ipport;
|
||||
|
|
Loading…
Reference in a new issue