From: Michael Friedrich Date: Tue, 29 Mar 2016 11:49:38 +0000 (+0200) Subject: Fix socket exceptions while querying the API X-Git-Tag: v2.5.0~441 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5dd685cef956596f27d91865b2f6b2fb1e8bfcc7;p=icinga2 Fix socket exceptions while querying the API fixes #11224 --- diff --git a/lib/base/tlsstream.cpp b/lib/base/tlsstream.cpp index f1248eee7..93a7501a5 100644 --- a/lib/base/tlsstream.cpp +++ b/lib/base/tlsstream.cpp @@ -245,7 +245,9 @@ void TlsStream::OnEvent(int revents) } if (m_Shutdown && !m_SendQ->IsDataAvailable()) { - lock.unlock(); + if (!success) + lock.unlock(); + Close(); } }