]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_hash: use 5 seconds connection timeouts for remote connections
authorMathieu Rene <mrene@avgs.ca>
Tue, 20 Jul 2010 18:44:33 +0000 (14:44 -0400)
committerMathieu Rene <mrene@avgs.ca>
Tue, 20 Jul 2010 18:45:53 +0000 (14:45 -0400)
src/mod/applications/mod_hash/mod_hash.c

index c0e8b55c150262a9f62aae52eb2eab25d44a9912..9ccfaf800ab348ad36cbc7ad474c36966418a3f3 100644 (file)
@@ -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);