From b8e963ed4f4accb1a3c0bf06f0da35cf698a69c3 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 24 Sep 2012 15:39:18 +0200 Subject: [PATCH] Call yaz_daemon_stop just after stop of socket bind instead of after graceful stop loop has ended (which could take a long time). --- src/filter_frontend_net.cpp | 2 ++ src/metaproxy_prog.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index d4867ad..4743c27 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include #include "gduutil.hpp" #include @@ -597,6 +598,7 @@ void yf::FrontendNet::process(Package &package) const size_t i; for (i = 0; i < m_p->m_ports.size(); i++) m_p->az[i]->server(""); + yaz_daemon_stop(); } } int no = m_p->mySocketManager.getNumberOfObservers(); diff --git a/src/metaproxy_prog.cpp b/src/metaproxy_prog.cpp index 5a50f44..b30fc0b 100644 --- a/src/metaproxy_prog.cpp +++ b/src/metaproxy_prog.cpp @@ -79,7 +79,6 @@ static void work_common(void *data) mp::Package pack; pack.router(*routerp).move(); yaz_log(YLOG_LOG, "metaproxy stop"); /* only for graceful stop */ - yaz_daemon_stop(); _exit(0); } -- 1.7.10.4