Fix crash in JsonRpcConnection::MessageHandlerWrapper

fixes #12506
This commit is contained in:
Gunnar Beutner 2016-08-22 16:35:16 +02:00
parent 4c011c5eaa
commit f4dce0fe72
2 changed files with 2 additions and 13 deletions

View File

@ -83,11 +83,7 @@ void HttpServerConnection::Disconnect(void)
m_CurrentRequest.~HttpRequest();
new (&m_CurrentRequest) HttpRequest(Stream::Ptr());
{
Stream::Ptr stream = m_Stream;
m_Stream.reset();
stream->Close();
}
m_Stream->Close();
}
bool HttpServerConnection::ProcessMessage(void)
@ -211,9 +207,6 @@ void HttpServerConnection::DataAvailableHandler(void)
{
bool close = false;
if (!m_Stream)
return;
if (!m_Stream->IsEof()) {
boost::mutex::scoped_lock lock(m_DataHandlerMutex);

View File

@ -129,11 +129,7 @@ void JsonRpcConnection::Disconnect(void)
Log(LogWarning, "JsonRpcConnection")
<< "API client disconnected for identity '" << m_Identity << "'";
{
Stream::Ptr stream = m_Stream;
m_Stream.reset();
stream->Close();
}
m_Stream->Close();
if (m_Endpoint)
m_Endpoint->RemoveClient(this);