mirror of https://github.com/Icinga/icinga2.git
parent
2a5a9d2f4b
commit
fd65fed6f0
|
@ -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