提交 7431fbe9 authored 作者: Mathieu Rene's avatar Mathieu Rene

mod_hash: use 5 seconds connection timeouts for remote connections

上级 12a0ec74
......@@ -743,7 +743,7 @@ static void *SWITCH_THREAD_FUNC limit_remote_thread(switch_thread_t *thread, voi
limit_remote_t *remote = (limit_remote_t*)obj;
while (remote->state > REMOTE_OFF) {
if (remote->state != REMOTE_UP) {
if (esl_connect(&remote->handle, remote->host, remote->port, remote->username, remote->password) == ESL_SUCCESS) {
if (esl_connect_timeout(&remote->handle, remote->host, remote->port, remote->username, remote->password, 5000) == ESL_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Connected to remote FreeSWITCH (%s) at %s:%d\n",
remote->name, remote->host, remote->port);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论