mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 06:34:42 +02:00
parent
4c011c5eaa
commit
f4dce0fe72
@ -83,11 +83,7 @@ void HttpServerConnection::Disconnect(void)
|
|||||||
m_CurrentRequest.~HttpRequest();
|
m_CurrentRequest.~HttpRequest();
|
||||||
new (&m_CurrentRequest) HttpRequest(Stream::Ptr());
|
new (&m_CurrentRequest) HttpRequest(Stream::Ptr());
|
||||||
|
|
||||||
{
|
m_Stream->Close();
|
||||||
Stream::Ptr stream = m_Stream;
|
|
||||||
m_Stream.reset();
|
|
||||||
stream->Close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HttpServerConnection::ProcessMessage(void)
|
bool HttpServerConnection::ProcessMessage(void)
|
||||||
@ -211,9 +207,6 @@ void HttpServerConnection::DataAvailableHandler(void)
|
|||||||
{
|
{
|
||||||
bool close = false;
|
bool close = false;
|
||||||
|
|
||||||
if (!m_Stream)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!m_Stream->IsEof()) {
|
if (!m_Stream->IsEof()) {
|
||||||
boost::mutex::scoped_lock lock(m_DataHandlerMutex);
|
boost::mutex::scoped_lock lock(m_DataHandlerMutex);
|
||||||
|
|
||||||
|
@ -129,11 +129,7 @@ void JsonRpcConnection::Disconnect(void)
|
|||||||
Log(LogWarning, "JsonRpcConnection")
|
Log(LogWarning, "JsonRpcConnection")
|
||||||
<< "API client disconnected for identity '" << m_Identity << "'";
|
<< "API client disconnected for identity '" << m_Identity << "'";
|
||||||
|
|
||||||
{
|
m_Stream->Close();
|
||||||
Stream::Ptr stream = m_Stream;
|
|
||||||
m_Stream.reset();
|
|
||||||
stream->Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_Endpoint)
|
if (m_Endpoint)
|
||||||
m_Endpoint->RemoveClient(this);
|
m_Endpoint->RemoveClient(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user