[icinga-checkins] icinga.org: icinga2/master: Close TLS connections more aggressively

git at icinga.org git at icinga.org
Sat Feb 14 19:15:12 CET 2015


Module: icinga2
Branch: master
Commit: 8903c7e37940d0cc67d0d3b765095856a16b4afb
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=8903c7e37940d0cc67d0d3b765095856a16b4afb

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Sat Feb 14 19:14:45 2015 +0100

Close TLS connections more aggressively

refs #6109

---

 lib/base/tlsstream.cpp |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/base/tlsstream.cpp b/lib/base/tlsstream.cpp
index 1f198fc..0eb9878 100644
--- a/lib/base/tlsstream.cpp
+++ b/lib/base/tlsstream.cpp
@@ -160,12 +160,11 @@ void TlsStream::OnEvent(int revents)
 
 			break;
 		case TlsActionClose:
-			rc = SSL_shutdown(m_SSL.get());
+			(void) SSL_shutdown(m_SSL.get());
+			rc = 1;
 
-			if (rc > 0) {
-				m_CloseOK = true;
-				m_CV.notify_all();
-			}
+			m_CloseOK = true;
+			m_CV.notify_all();
 
 			break;
 		default:
@@ -307,4 +306,4 @@ bool TlsStream::IsDataAvailable(void) const
 	boost::mutex::scoped_lock lock(m_Mutex);
 
 	return m_RecvQ->GetAvailableBytes() > 0;
-}
\ No newline at end of file
+}



More information about the icinga-checkins mailing list