]> granicus.if.org Git - icinga2/commitdiff
Fix socket exceptions while querying the API
authorMichael Friedrich <michael.friedrich@netways.de>
Tue, 29 Mar 2016 11:49:38 +0000 (13:49 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 20 Apr 2016 08:07:24 +0000 (10:07 +0200)
fixes #11224

lib/base/tlsstream.cpp

index f1248eee7d069263636d3c4893c74969efc59cb4..93a7501a5f176047d7a8ed0c0facb25471e016af 100644 (file)
@@ -245,7 +245,9 @@ void TlsStream::OnEvent(int revents)
        }
 
        if (m_Shutdown && !m_SendQ->IsDataAvailable()) {
-               lock.unlock();
+               if (!success)
+                       lock.unlock();
+
                Close();
        }
 }