diff --git a/src/switch_cpp.cpp b/src/switch_cpp.cpp index 1c42eb1378..18738adde4 100644 --- a/src/switch_cpp.cpp +++ b/src/switch_cpp.cpp @@ -57,12 +57,11 @@ SWITCH_DECLARE_CONSTRUCTOR EventConsumer::EventConsumer(const char *event_name, switch_core_new_memory_pool(&pool); switch_queue_create(&events, len, pool); node_index = 0; + ready = 1; if (!zstr(event_name)) { bind(event_name, subclass_name); } - - ready = 1; } SWITCH_DECLARE(int) EventConsumer::bind(const char *event_name, const char *subclass_name)