THRIFT-2225 cpp: SSLContext destroy before cleanupOpenSSL
authorRoger Meier <roger@apache.org>
Sun, 2 Feb 2014 22:56:19 +0000 (23:56 +0100)
committerRoger Meier <roger@apache.org>
Sun, 2 Feb 2014 22:56:19 +0000 (23:56 +0100)
Patch: soyer

lib/cpp/src/thrift/transport/TSSLSocket.cpp

index 029c541..5f39f1c 100644 (file)
@@ -363,6 +363,7 @@ TSSLSocketFactory::TSSLSocketFactory(): server_(false) {
 
 TSSLSocketFactory::~TSSLSocketFactory() {
   Guard guard(mutex_);
+  ctx_.reset();
   count_--;
   if (count_ == 0) {
     cleanupOpenSSL();