From: Adam Dickmeiss Date: Mon, 21 Jan 2008 16:15:00 +0000 (+0000) Subject: Fixed bug #1130: Problem with SRU server closing connection. X-Git-Tag: METAPROXY.1.0.13~31 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=b112dc32edc6bf672a08ed573ec921d0a80a7c79;p=metaproxy-moved-to-github.git Fixed bug #1130: Problem with SRU server closing connection. This problem is fixed by using Z_Assoc::close when the session closes rather than just deleting and close(shutdown) the socket. The Z_Assoc::close as of yazpp 1.1.0 should do things correctly. --- diff --git a/configure.ac b/configure.ac index 844b31b..9869bc3 100644 --- a/configure.ac +++ b/configure.ac @@ -36,7 +36,7 @@ AC_CHECK_LIB(dl,dlopen) AC_CHECK_LIB(m,main) ## YAZPP checks -YAZPP_INIT([threads],[1.0.3]) +YAZPP_INIT([threads],[1.1.0]) if test -z "$YAZPPLIB"; then AC_MSG_ERROR([YAZ++ development libraries missing]) fi diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index 38ed62b..1b87267 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -1,4 +1,4 @@ -/* $Id: filter_frontend_net.cpp,v 1.24 2007-05-09 21:23:09 adam Exp $ +/* $Id: filter_frontend_net.cpp,v 1.25 2008-01-21 16:15:00 adam Exp $ Copyright (c) 2005-2007, Index Data. This file is part of Metaproxy. @@ -152,7 +152,9 @@ void mp::ThreadPoolPackage::result() } if (m_session->m_no_requests == 0 && m_package->session().is_closed()) - delete m_session; + { + m_session->close(); + } delete this; } @@ -205,7 +207,10 @@ void mp::ZAssocChild::failNotify() { // TODO: send Package to signal "close" if (m_session.is_closed()) + { + delete this; return; + } m_no_requests++; m_session.close();