提交 27d8378f authored 作者: Mathieu Rene's avatar Mathieu Rene

mod_hash: use esl_recv_timed with a 5000ms timeout when doing api commands

上级 49d6c803
...@@ -750,7 +750,7 @@ static void *SWITCH_THREAD_FUNC limit_remote_thread(switch_thread_t *thread, voi ...@@ -750,7 +750,7 @@ static void *SWITCH_THREAD_FUNC limit_remote_thread(switch_thread_t *thread, voi
remote->state = REMOTE_UP; remote->state = REMOTE_UP;
} }
} else { } else {
if (esl_send_recv(&remote->handle, "api hash_dump limit") != ESL_SUCCESS) { if (esl_send_recv_timed(&remote->handle, "api hash_dump limit", 5000) != ESL_SUCCESS) {
esl_disconnect(&remote->handle); esl_disconnect(&remote->handle);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Disconnected from remote FreeSWITCH (%s) at %s:%d\n", switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Disconnected from remote FreeSWITCH (%s) at %s:%d\n",
remote->name, remote->host, remote->port); remote->name, remote->host, remote->port);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论