mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6429 from Icinga/bugfix/api-log-spam-6428
Make HttpServerConnection#m_DataHandlerMutex a boost::recursive_mutex
This commit is contained in:
commit
8c8f1deb1f
|
@ -77,7 +77,7 @@ TlsStream::Ptr HttpServerConnection::GetStream() const
|
|||
|
||||
void HttpServerConnection::Disconnect()
|
||||
{
|
||||
boost::mutex::scoped_try_lock lock(m_DataHandlerMutex);
|
||||
boost::recursive_mutex::scoped_try_lock lock(m_DataHandlerMutex);
|
||||
if (!lock.owns_lock()) {
|
||||
Log(LogInformation, "HttpServerConnection", "Unable to disconnect Http client, I/O thread busy");
|
||||
return;
|
||||
|
@ -342,7 +342,7 @@ void HttpServerConnection::DataAvailableHandler()
|
|||
bool close = false;
|
||||
|
||||
if (!m_Stream->IsEof()) {
|
||||
boost::mutex::scoped_lock lock(m_DataHandlerMutex);
|
||||
boost::recursive_mutex::scoped_lock lock(m_DataHandlerMutex);
|
||||
|
||||
m_Stream->SetCorked(true);
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "remote/apiuser.hpp"
|
||||
#include "base/tlsstream.hpp"
|
||||
#include "base/workqueue.hpp"
|
||||
#include <boost/thread/recursive_mutex.hpp>
|
||||
|
||||
namespace icinga
|
||||
{
|
||||
|
@ -55,7 +56,7 @@ private:
|
|||
TlsStream::Ptr m_Stream;
|
||||
double m_Seen;
|
||||
HttpRequest m_CurrentRequest;
|
||||
boost::mutex m_DataHandlerMutex;
|
||||
boost::recursive_mutex m_DataHandlerMutex;
|
||||
WorkQueue m_RequestQueue;
|
||||
int m_PendingRequests;
|
||||
|
||||
|
|
Loading…
Reference in New Issue