0
0
Fork 0
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:
Jason Volk 2018-04-07 06:01:38 -07:00
parent 8d91c90574
commit 6488141f64

View file

@ -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;