From 6c22b9ec06b01ccd29a8a72e5860bb26d6fe34b0 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 16 Jan 2017 00:33:10 +1300 Subject: [PATCH] Reset TLS session unconditionally on PeerConnector errors The session state cleanup should be done regardless of library. GnuTLS crash was the result of a bug elsewhere which is now fixed. So remove mention of that. --- src/security/PeerConnector.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/security/PeerConnector.cc b/src/security/PeerConnector.cc index 5b199ab55b..194a1bb032 100644 --- a/src/security/PeerConnector.cc +++ b/src/security/PeerConnector.cc @@ -552,12 +552,9 @@ Security::PeerConnector::bail(ErrorState *error) // minimize the number of fd-closure notifications and let the recepient // manage the TCP state of the connection. -#if USE_GNUTLS - // but we do need to release the bad TLS related details in fd_table - // ... or GnuTLS will SEGFAULT. + // but we should release the TLS session (if any) const int fd = serverConnection()->fd; Security::SessionClose(fd_table[fd].ssl, fd); -#endif } void -- 2.47.2