From 80baf3292dc5013415f7323686248d1c8cefbeae Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Mon, 9 Oct 2006 10:32:21 +0000 Subject: [PATCH] oops - returnSocket does not close of the fdmultiplexer said the fd was not (yet) listed, spotted by Stefan Schmidt git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@899 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/pdns_recursor.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 7456212be..f25fb06c0 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -270,7 +270,12 @@ public: if(i==d_socks.end()) { throw AhuException("Trying to return a socket not in the pool"); } - g_fdm->removeReadFD(*i); + try { + g_fdm->removeReadFD(*i); + } + catch(FDMultiplexerException& e) { + // we sometimes return a socket that has not yet been assigned to g_fdm + } Utility::closesocket(*i); d_socks.erase(i++); -- 2.49.0