]> granicus.if.org Git - icinga2/commitdiff
Properly close TLS connections
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 4 Aug 2014 11:35:12 +0000 (13:35 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 4 Aug 2014 11:35:12 +0000 (13:35 +0200)
refs #6724

lib/remote/apilistener.cpp

index 5f981bd600f340f5cd7eddac8e34a66fb5f7a4cb..bdf3877930ce55373f216bb753c4d3dfa2377665 100644 (file)
@@ -226,6 +226,7 @@ void ApiListener::AddConnection(const Endpoint::Ptr& endpoint)
                endpoint->SetConnecting(false);
        } catch (const std::exception& ex) {
                endpoint->SetConnecting(false);
+               client->Close();
 
                std::ostringstream info, debug;
                info << "Cannot connect to host '" << host << "' on port '" << port << "'";