From 1a7b206d411b61bbf44b26b218e5b2e22952cbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Thu, 9 Oct 2008 19:13:46 +0000 Subject: [PATCH] If code word client fail to connect, don't retry too quickly. --- cwc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cwc.c b/cwc.c index 00f4ff3a..ca300198 100644 --- a/cwc.c +++ b/cwc.c @@ -731,8 +731,12 @@ cwc_thread(void *aux) pthread_mutex_lock(&global_lock); if(fd == -1) { - tvhlog(LOG_INFO, "cwc", "Connection attempt to %s:%d failed: %s", + tvhlog(LOG_INFO, "cwc", + "Connection attempt to %s:%d failed: %s, retry in 3 seconds", hostname, port, errbuf); + pthread_mutex_unlock(&global_lock); + sleep(3); + pthread_mutex_lock(&global_lock); continue; }