提交 57e8231c authored 作者: Chris Rienzo's avatar Chris Rienzo

FS-6929 #resolve #comment fix deadlock in mod_rayo

上级 12b69406
...@@ -948,19 +948,20 @@ void rayo_actor_destroy(struct rayo_actor *actor, const char *file, int line) ...@@ -948,19 +948,20 @@ void rayo_actor_destroy(struct rayo_actor *actor, const char *file, int line)
} else { } else {
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_DEBUG, "Destroying %s\n", RAYO_JID(actor)); switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_DEBUG, "Destroying %s\n", RAYO_JID(actor));
} }
switch_core_hash_delete(globals.destroy_actors, RAYO_JID(actor));
switch_mutex_unlock(globals.actors_mutex);
/* safe to destroy parent now */
if (actor->cleanup_fn) { if (actor->cleanup_fn) {
actor->cleanup_fn(actor); actor->cleanup_fn(actor);
} }
if (actor->parent) { if (actor->parent) {
/* safe to destroy parent now */
RAYO_RELEASE(actor->parent); RAYO_RELEASE(actor->parent);
} }
switch_core_hash_delete(globals.destroy_actors, RAYO_JID(actor));
switch_core_destroy_memory_pool(&pool); switch_core_destroy_memory_pool(&pool);
} else { } else {
switch_core_hash_insert(globals.destroy_actors, RAYO_JID(actor), actor); switch_core_hash_insert(globals.destroy_actors, RAYO_JID(actor), actor);
switch_mutex_unlock(globals.actors_mutex);
} }
switch_mutex_unlock(globals.actors_mutex);
} }
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论