diff --git a/src/switch_core_timer.c b/src/switch_core_timer.c index 01fe20ce55..ca09fe0301 100644 --- a/src/switch_core_timer.c +++ b/src/switch_core_timer.c @@ -61,9 +61,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, co switch_set_flag(timer, SWITCH_TIMER_FLAG_FREE_POOL); } - timer->timer_interface->timer_init(timer); - return SWITCH_STATUS_SUCCESS; - + return timer->timer_interface->timer_init(timer); } SWITCH_DECLARE(switch_status_t) switch_core_timer_next(switch_timer_t *timer) diff --git a/src/switch_time.c b/src/switch_time.c index 53813df6ce..19eb412aea 100644 --- a/src/switch_time.c +++ b/src/switch_time.c @@ -233,8 +233,8 @@ static switch_status_t timer_init(switch_timer_t *timer) while (globals.STARTED == 0) { do_sleep(100000); - if (++sanity == 10) { - break; + if (++sanity == 300) { + abort(); } }