mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-16 18:24:31 +02:00
Merge pull request #6817 from Icinga/bugfix/stalled-tls-connections-6816
HttpServerConnection#DataAvailableHandler(): be aware of being called multiple times concurrently
This commit is contained in:
commit
b58ce84b0e
@ -351,7 +351,11 @@ void HttpServerConnection::DataAvailableHandler()
|
|||||||
bool close = false;
|
bool close = false;
|
||||||
|
|
||||||
if (!m_Stream->IsEof()) {
|
if (!m_Stream->IsEof()) {
|
||||||
boost::recursive_mutex::scoped_lock lock(m_DataHandlerMutex);
|
boost::recursive_mutex::scoped_try_lock lock(m_DataHandlerMutex);
|
||||||
|
if (!lock.owns_lock()) {
|
||||||
|
Log(LogInformation, "HttpServerConnection", "Unable to process available data, they're already being processed in another thread");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
while (ProcessMessage())
|
while (ProcessMessage())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user