mirror of https://github.com/Icinga/icinga2.git
parent
eda28b219d
commit
93834623a0
|
@ -53,6 +53,11 @@ ApiListener::ApiListener(void)
|
|||
|
||||
void ApiListener::OnConfigLoaded(void)
|
||||
{
|
||||
if (m_Instance)
|
||||
BOOST_THROW_EXCEPTION(ScriptError("Only one ApiListener object is allowed.", GetDebugInfo()));
|
||||
|
||||
m_Instance = this;
|
||||
|
||||
/* set up SSL context */
|
||||
boost::shared_ptr<X509> cert;
|
||||
try {
|
||||
|
@ -104,11 +109,6 @@ void ApiListener::Start(bool runtimeCreated)
|
|||
{
|
||||
SyncZoneDirs();
|
||||
|
||||
if (m_Instance)
|
||||
BOOST_THROW_EXCEPTION(ScriptError("Only one ApiListener object is allowed.", GetDebugInfo()));
|
||||
|
||||
m_Instance = this;
|
||||
|
||||
ObjectImpl<ApiListener>::Start(runtimeCreated);
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue