tcp: break the timeout loop early when tvheadend is in the shutdown phase
This commit is contained in:
parent
d9d9531d86
commit
a4300bee58
1 changed files with 6 additions and 0 deletions
|
@ -118,6 +118,12 @@ tcp_connect(const char *hostname, int port, const char *bindaddr,
|
|||
timeout = 0;
|
||||
|
||||
while (1) {
|
||||
if (!tvheadend_running) {
|
||||
tvhpoll_destroy(efd);
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
r = tvhpoll_wait(efd, &ev, 1, timeout * 1000);
|
||||
if (r > 0)
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue