From ba619d0b3f9e9f70ae8119cd93bf0949d6c9e238 Mon Sep 17 00:00:00 2001 From: psychon Date: Fri, 29 Feb 2008 15:51:04 +0000 Subject: [PATCH] Update to latest Csocket *again* Csocket closed the sockets before openssl could send the close alert. This fixes that. Why am I always finding bugs in this code? :( git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@968 726aef4b-f618-498e-8847-2d620e286838 --- Csocket.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Csocket.cpp b/Csocket.cpp index 3cc7c791..46eeac8d 100644 --- a/Csocket.cpp +++ b/Csocket.cpp @@ -28,7 +28,7 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * -* $Revision: 1.67 $ +* $Revision: 1.68 $ */ #include "Csocket.h" @@ -587,6 +587,11 @@ Csock::~Csock() } #endif /* __DO_THREADS_ */ +#ifdef HAVE_LIBSSL + FREE_SSL(); + FREE_CTX(); +#endif /* HAVE_LIBSSL */ + if ( m_iReadSock != m_iWriteSock ) { if( m_iReadSock >= 0 ) @@ -599,11 +604,6 @@ Csock::~Csock() m_iReadSock = -1; m_iWriteSock = -1; -#ifdef HAVE_LIBSSL - FREE_SSL(); - FREE_CTX(); - -#endif /* HAVE_LIBSSL */ // delete any left over crons for( vector::size_type i = 0; i < m_vcCrons.size(); i++ ) CS_Delete( m_vcCrons[i] );