From f235fc155e7ed0eafa0e96d339c08c4f3317acbc Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 21 Feb 2018 17:44:08 -0800 Subject: [PATCH] ircd::server: Close and remove node on name resolution error. --- ircd/server.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ircd/server.cc b/ircd/server.cc index 9dc660f5c..6c4196e7e 100644 --- a/ircd/server.cc +++ b/ircd/server.cc @@ -713,11 +713,14 @@ catch(const std::exception &e) if(wp.expired()) return; - for(auto &link : links) - for(auto &tag : link.queue) - tag.set_exception(e); + close(); + log.error("Removing node(%p): during name resolution: %s", + this, + e.what()); - nodes.erase(remote.hostname); + const auto it(nodes.find(remote.hostname)); + assert(it != end(nodes)); + nodes.erase(it); } size_t