From 6488141f6454c7cc6ab4095edaa32026c0286d53 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 7 Apr 2018 06:01:38 -0700 Subject: [PATCH] ircd::server: Additional assertions. --- ircd/server.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ircd/server.cc b/ircd/server.cc index b9f68d96b..1d0cf3893 100644 --- a/ircd/server.cc +++ b/ircd/server.cc @@ -367,6 +367,7 @@ void ircd::server::peer::close(const net::close_opts &opts) { op_fini = true; + assert(!op_resolve); std::vector 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;