If code word client fail to connect, don't retry too quickly.
This commit is contained in:
parent
1f536a80cd
commit
1a7b206d41
1 changed files with 5 additions and 1 deletions
6
cwc.c
6
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue