mirror of https://github.com/Icinga/icinga2.git
Fix another problem where Icinga doesn't detect that a cluster connection is dead
refs #8485
This commit is contained in:
parent
559350d557
commit
4972364f42
|
@ -167,14 +167,6 @@ void TlsStream::OnEvent(int revents)
|
||||||
m_CV.notify_all();
|
m_CV.notify_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
case TlsActionClose:
|
|
||||||
(void) SSL_shutdown(m_SSL.get());
|
|
||||||
rc = 1;
|
|
||||||
|
|
||||||
m_CloseOK = true;
|
|
||||||
m_CV.notify_all();
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
VERIFY(!"Invalid TlsAction");
|
VERIFY(!"Invalid TlsAction");
|
||||||
|
@ -290,13 +282,11 @@ void TlsStream::Write(const void *buffer, size_t count)
|
||||||
void TlsStream::Close(void)
|
void TlsStream::Close(void)
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock lock(m_Mutex);
|
boost::mutex::scoped_lock lock(m_Mutex);
|
||||||
m_CurrentAction = TlsActionClose;
|
(void) SSL_shutdown(m_SSL.get());
|
||||||
ChangeEvents(POLLOUT);
|
m_Socket->Close();
|
||||||
|
|
||||||
while (!m_CloseOK && !m_ErrorOccurred)
|
m_CloseOK = true;
|
||||||
m_CV.wait(lock);
|
m_CV.notify_all();
|
||||||
|
|
||||||
HandleError();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TlsStream::IsEof(void) const
|
bool TlsStream::IsEof(void) const
|
||||||
|
|
|
@ -35,8 +35,7 @@ enum TlsAction
|
||||||
TlsActionNone,
|
TlsActionNone,
|
||||||
TlsActionRead,
|
TlsActionRead,
|
||||||
TlsActionWrite,
|
TlsActionWrite,
|
||||||
TlsActionHandshake,
|
TlsActionHandshake
|
||||||
TlsActionClose
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue